Computer Questions Not Worth Their Own Thread II

Okay, cool. I did that, and I see it in the startup lists shown on CCleaner. Anything else I need to do, to make sure it actually runs on boot up? I rebooted, and it does not yet appear in the active processes list in Task Manager either.
 
No, that's all you need to do... Is there a problem with the program? Is something else (e.g. CCleaner or some other start-up control app) conflicting with it/preventing it from loading?
 
I do have CCleaner, and I do have Speedfan set to be run as an admin, which gives me the UAC prompt when I run it manually.

I do know that speedfan does show up in the list of startup programs in CCleaner, when I look at the Startup tool list, and shows it as "Enabled".
 
Quite a basic question about writing a macro for Outlook - the macro is designed to automatically fill in a certain prefix in the subject line for emails sent to certain recipients. I've written the thing and it works fine if I write and send the new email in a new window, but complains if I try to send anything from the 'preview' window. The line that it jars on is:

Code:
Set oMail = Application.ActiveInspector.CurrentItem

And it's all under the header of

Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

I assume I need to set an 'if' condition before the problematic line to have it do one thing for a new-window email and one for a preview-window email - does anybody know how to make that happen?
 
I'm guessing this is Outlook 2013, which I'm not familiar with. However, if you're looking for the object that refers to the current mail item, and the code is in the ItemSend event, then the "Item" object that's passed as an argument to this event should suffice. I.e. in Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean), Item should refer to the current item that triggered the event, so there shouldn't be a need to try and find any other item using ActiveInspector.

In other words, try doing "set oMail = Item" instead and see if that works.
 
Sup guys, I'm trying to do some investment calculations, and I need to talk this through...

So I invest a certain (fixed) amount of money each month in several different unit funds. I can track the price of these funds programmatically using python - I currently store them all in a CSV file, waiting to be analysed later. I currently analyse them in Excel: I have a spreadsheet that says how much I have invested in each fund, with dates and the purchase price. From the CSV file that tracks the prices, I know today's price. I add up the current value of each fund, then have another column which I call "value at constant interest rate". This extra column takes the amount invested on each row and calculates how much I would have earnt if I had held the money in a bank; in other words, it calculates the hypothetical amount of money I would have made if I had held the money in a bank instead of investing in that particular fund. Now, the interest rate on this column is set such that the return for the fund is equal to the actual return that I got from my investments; in this way, I calculate the "interest rate equivalent" for that particular fund; i.e. what interest rate would the bank have to offer, in order to match the return I got on that fund? That way I can compare my investments in the stock market to my savings in the bank. (I do this with an iterative formula.)

Every month, I manually add lines to the end of the file that say how much extra I invested in each fund this month, and the formulas recalculate.

If that didn't make sense, I'll upload a spreadsheet with all the data and formulae in it. I'd rather not though obviously as it exposes some of my personal finances, but if it would help then I'll do that!

Basically, I want to know what the best way of implementing this in a programming language is. I would rather calculate all of this in a python script that outputs something (text at the moment, but maybe some whizzy graphs or something too!) to an html file, which I can then look up at my leisure.

I think the problem will be the "interest rate equivalent" part, because the only way I can think of doing it is with an iterative formula in excel. I'm aware that iteration is the bread and butter of programming languages, but actually I think in this case, the iteration is only necessary because of Excel's limitations, or perhaps my own limitations in seeing an analytical solution.

So far, my idea is to do the following. Bear in mind I am a complete beginner with python, so this is probably a dumb way of doing it:

1) load the CSV file containing today's prices
2) load the records containing my transaction info for the investment's I've made to date
3) check if the file from [2] contains the date that I most recently would have invested the fixed amount into the funds.
4) if [3] is "no", then add the record(s) automatically
5) For each record in transaction file, calculate the value at today's prices
6) For each fund:
6a) Assume a 4% annual constant rate of return, and calculate the value at this rate of return
6b) Change the 4% up or down until the rate of return from 5b = RoR from 5a
6c) record this final % RoR somewhere
7) Once all funds have been done in this way, output the fund names, investment amounts, value today, and % RoR to an html file in the prettiest way I can be bothered to come up with at short notice.

So I think step 6 is clunky and silly, and I'm sure there's better ways of doing it.

Does this make sense to anyone? Does anyone have any ideas for making it work good?
 
So you want to see how much a single stock outperformed/underperformed compared to the rest of your portfolio?
Can't you calculate the rate of return on a single stock and on your portfolio, and just subtract the two?
 
No, it's even simpler than that... I actually just want to calculate the annualised rate of return for each stock! It's... harder than it sounds. Or maybe it isn't! Here is some example data: https://www.dropbox.com/s/zsmjui5vbwerj2g/150503 - Portfolio return example for CFC.xlsx?dl=0

They're all dummy numbers obviously. The idea is to say "if i had invested my £x per month in a bank instead, what interest rate would I have required to achieve the same return as funds A and B?"
 
Sorry if I misunderstood this, but anyhow:

If the annual interest is p%, you will have 1 + p/100 times the money at the end of the year (1.04 in the case of 4%). Let's call that i := 1+ p/100.

So if you have been investing for, say, 74 days, you have i^(74/365) times the money at the end of the peridod.

Now, suppose you have invested m money for d days and have x money at the end of the period. The internal interest rate of the investment (as I believe it is called) comes from the formula
m*i^(d/365) = x,
hence
i^(d/365) =x/m
i=(d/365)-root(x/m),

Again, sorry if I completely misunderstood the problem. I have come across with this kinds of things when I studied a little bit actuarial maths. You might be interested too. Fundamentals of actuarial mathematics by David Promislow had a special excel approach to it.

EDIT: Especially, there's a way to do this better if you invest in the same fund every month or something like that. I don't remember it, and even if I would reproducing it here would be laborous and confusing.
 
Seems much easier to me to just use another browser, even without considering uBlock works better than Ghostery in the first place.
Just an update: Ghostery is now working for me. Thanks to everyone who offered comments on this. :)

Zelig, I don't like other browsers. That's why I only use Firefox.
 
Sorry if I misunderstood this, but anyhow:

If the annual interest is p%, you will have 1 + p/100 times the money at the end of the year (1.04 in the case of 4%). Let's call that i := 1+ p/100.

So if you have been investing for, say, 74 days, you have i^(74/365) times the money at the end of the peridod.

Now, suppose you have invested m money for d days and have x money at the end of the period. The internal interest rate of the investment (as I believe it is called) comes from the formula
m*i^(d/365) = x,
hence
i^(d/365) =x/m
i=(d/365)-root(x/m),

Again, sorry if I completely misunderstood the problem. I have come across with this kinds of things when I studied a little bit actuarial maths. You might be interested too. Fundamentals of actuarial mathematics by David Promislow had a special excel approach to it.

EDIT: Especially, there's a way to do this better if you invest in the same fund every month or something like that. I don't remember it, and even if I would reproducing it here would be laborous and confusing.

This is almost it! I'm not sure how you get from "i^(d/365) =x/m" to "i=(d/365)-root(x/m)" though. Isn't it "i = (x/m)^(365/d)" ?

The problem is, this is fine for working out the return on one single month or period, but if I invest the same amount each month for 12 separate months, and I know the total amount invested, the total value of investments at the end of the period, and the amount I put in (and at what dates and prices), how can I calculate the rate of return on the entire 12 month period? Each month will have a different return, because, although the amount I put in each month is the same, (a) the value at the end will be different (due to different buy and sell prices), and (b) the amount of time elapsed "d" will be different each month. So for each of the 12 periods, I'll have a different "i" calculated at the end of it. I can't just take an average obviously, as this doesn't give me the right number. A weighted average, weighting by value or units or time, also doesn't seem to work.

I haven't got an analytical solution for this, and I think think would be preferable. At the moment, what I'm doing is, taking the £ amount invested each month m, along with a trial value for the interest rate i, and calculating "m*i^(dt/365) = xt" to get x for each month "t". Then I'm summing xt for all months t to give me X. Then, I'm comparing this value of X to the actual value I have in my investment account at the end of the period Xactual. If X > Xactual, then "i" goes down a little bit, and vice versa, until X converges with Xactual. When they converge, I have the interest rate "i" that would fully explain how I got from putting in t monthly payments of m to getting out Xactual. I do this with a simple iterative formula in Excel.

So I've got a numerical method for solving this. The problem is (a) I can't find an analytical solution, which would be preferable, and (b) programming this with my limited knowledge of Python is quite clunky. So I suppose I have two problems...

Does this make sense?
 
This is almost it! I'm not sure how you get from "i^(d/365) =x/m" to "i=(d/365)-root(x/m)" though. Isn't it "i = (x/m)^(365/d)" ?

They're the same thing! Although, your notation is better. ;D

If you invest monthly amount of m pounds with monthly interest of i, you'll have at the end of the year
m+m*i+m*i^2+....'m*i^11 = m (1+i+i^2'...+i^11),
supposing you invest at the end of the month when the interest is paid too. It is a geometric series, whose sum is
m*(i-i^11)/(1-i).

So, the method would be to mark that as equal to your present funds (with 11 changed accordingly) and to solve i from it. From the monthly interest i you get the annual interest a=i^12. (EDIT: It looks like this comes back to your original problem, since i isn't easily solvable from that).

You might want to check the reasoning from more authoritative source though, the correct word for looking it up is "annuity" (wiki for example). You might also find something more suitable for your needs there, different sized of monthly investments etc.
 
Thanks for your help! m*(i-i^t)/(1-i) is certainly easier to deal with, even if it still needs to be solved numerically. It means I don't have to keep track of so many things in the script: I can just keep track of the total value of the account after t months, and the amount I put in each month (though as you say, it does assume the same dates and amounts each month, but for me that's good enough). Thanks!
 
Just an update: Ghostery is now working for me. Thanks to everyone who offered comments on this. :)

Zelig, I don't like other browsers. That's why I only use Firefox.

In that context I was talking not about multiple browser vendors, but multiple browser installations to avoid needing to selectively toggle Ghostery. You could easily have multiple installations of Firefox with independent settings and extensions.
 
The charger for my laptop has stopped working, except at a very particular angle, which seems to shift over time. I'm led to believe that this is either a fault in the charger (easy to replace) or the female port, which is altogether more difficult and more expensive to solve. Is there any way I could diagnose which, short of buying another charger?
 
The charger for my laptop has stopped working, except at a very particular angle, which seems to shift over time. I'm led to believe that this is either a fault in the charger (easy to replace) or the female port, which is altogether more difficult and more expensive to solve. Is there any way I could diagnose which, short of buying another charger?

Can you not tell from which bit you have to "wiggle" to get it to work? If you move the connector relative to the computer it is likely to be the female port. If you hold the end of the connector steady while you wiggle the wire that goes into it then it is the charger? I could easily be wrong, but this is what I would do.
 
Good thought - unfortunately, I've just rotated it 180 degrees and pushed it against the same part of the socket, and it behaves exactly the same - which seems to suggest that a repair or medium-term application of black tape is in order.
 
The charger for my laptop has stopped working, except at a very particular angle, which seems to shift over time. I'm led to believe that this is either a fault in the charger (easy to replace) or the female port, which is altogether more difficult and more expensive to solve. Is there any way I could diagnose which, short of buying another charger?

Have any friends you know with a laptop that uses the same charger?
 
Hi!

I was wondering if there is any way to take a look at the actual codes of my pc games. I mean I'm interested in programming so I'd like to know how to do this to learn by looking how the real programmers do these games. I understand that the game puts my save files and my personal settings to the files folder (or whatever that is in english windows). Then I found the sound files folder and the texture files folder from the same directory with the game file (the thingy which opens the game when you click it...). I was able to change some game sounds and it was fun. However I'd like to find the actual code files which determine when some sound or some action will be launched.

I hope you can understand what I mean...


Thanks
 
Top Bottom