Canadian Money Forum banner

1 - 7 of 7 Posts

·
Registered
Joined
·
19 Posts
Discussion Starter #1
Hey everybody,

I have not had the pleasure of compounding a 100% loss with leverage, but I am putting together a demonstration on the perils of leverage for an evening class that I teach on index investing. I realized when trying to calculate annualized returns for a 110% loss (due to leverage) that it may not even be possible.

The Actual/365 Fixed formula that I use falls apart when the loss is a large negative value:

Here's some of my JavaSript code (simplified somewhat):
days = Date.daysBetween(startDate, endDate);
//Factor = Days Between / 365
Math.pow(Math.abs(endPortfolioValue) / startPortfolioValue, 365/days) - 1

Plugging in the following numbers:
>>Math.pow(-1000 / 10000, 365/(365*2)) - 1

I get this weird looking result:
-1.#IND

Do people ever annualize 100%+ losses. Would anyone want to!!!? :tongue-new:

Rob
 

·
Registered
Joined
·
64 Posts
Hey blackjacques,

What you have is a negative number (the return) being raised to a fractional power (a portion of a year).
This is not as simple as raising it to an integer power.
However, keep in mind that a negative number raised to an even integer power will give you a positive result. That will be nonsense in this case.
You may need to find another way of showing the magnitude of the loss.
Eg. If you lost 120% in six months, then you might have lost 240% in a year.
Though I would think even that answer is nonsense.

To read more about fractional power problems, see this:
http://mathforum.org/library/drmath/view/62979.html

Happy calculating,
Vikash
www.archerETF.com
 

·
Registered
Joined
·
2,626 Posts
Eg. If you lost 120% in six months, then you might have lost 240% in a year.
Though I would think even that answer is nonsense.
^ this.

ALL the money is gone. Unless you care about the rate of decay in the value of your investment, it is all meaningless.
 

·
Registered
Joined
·
39 Posts
Out of curiosity, what is this class you're teaching? (I remember seeing a post saying that you are in Ottawa)
 

·
Registered
Joined
·
130 Posts
The problem with the compounding formula is your compounding against a shrinking capital base so to get a number past -1 is impossible. To do this you need to include the leverage in the capital base and then multiply against the leverage. Your formula would look something like:

((([%leverage]*[starting value] + [ending value])/((1+[%leverage])*[endingvalue]))^(365/[days])-1)*([%leverage] + 1)

Note if [%leverage] = 0 you get the orriginal formula.

JS is a strange language to show this in. Why did you pick this?
 

·
Registered
Joined
·
19 Posts
Discussion Starter #7
Hi everybody,

Thanks for the great answers! That will really help me to calculate what I'm looking for, which is in fact some sort of average "rate of decay", to quote Sampson.

archerETF, thanks for the link! I knew that the standard formula(s) for calculating positive end values would fall apart with negative ones, I didn't know exactly why. Now I get it!

mart, the course is called "Yes, you can beat the market with index investing". I want to change that title because it's too optimistic/aggressive. The core of the course is really pretty standard indexing stuff. I teach it at Glebe HS on Wednesdays. Next term starts Oct 3rd.

I also have my little Web app in development that analyzes different buying and selling strategies against a fund/stock. It's really just a fun project. I wrote it in JavaScript so that I didn't have to get into server-side stuff, but I will have to go that way soon I think. Getting kinda heavy for the browser. Check it out if you want. And give me comments. The more the better!

Rob
 
1 - 7 of 7 Posts
Top