Serving the Quantitative Finance Community

 
User avatar
AnnaBegins
Topic Author
Posts: 0
Joined: January 9th, 2004, 8:27 am

Calculating volatility for long/short portfolio

September 21st, 2007, 8:44 am

Hi,In my monte-carlo simulation model, I calculate (and output) volatility as the standard deviation of log returns. However, if I simulate a long/short portfolio of equities over 1 year, I sometimes see returns that are less than -100%. e.g. I hold a short position in vodafone and the stock triples in price. Now, the log return calculation is undefined (log of a negative number undefined)... and my volatility calculation falls over.Could anyone suggest the preferred method of calculating volatility in this case?(Should I just use simple returns and calculate the standard deviation of them.... or is there something smarter I could do?)Thanks in advance,AB
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 9:05 am

sounds to me like you are very confused.price return over a period isr = log (P(t)/P(t-1))orr = P(t)/P(t-1) - 1depending on how sophisticated you want to be ...calculating the vol for a stock that goes up or down is the same. you take the standard deviation of the returns over any period and annualise it (if you wish).if you are looking at a portoflio of stocks over a period and you wish to calculate the vol of that portfolio, then proceed as above. Work ouk the value of the portfolio at the required frequency and calculate the returns and then vol of returns.hth
Last edited by daveangel on September 20th, 2007, 10:00 pm, edited 1 time in total.
knowledge comes, wisdom lingers
 
User avatar
AnnaBegins
Topic Author
Posts: 0
Joined: January 9th, 2004, 8:27 am

Calculating volatility for long/short portfolio

September 21st, 2007, 9:46 am

Thanks.In the first equation if P(t) = 0, the log function cannot be calculated.----> I can get round this by setting P(t) = 0.001For the short positions, my engine is trying to calculate ln((-4)/1) = undefined.... (if P(t) = 4 and P(t-1) = 1)Any thoughts?AB
Last edited by AnnaBegins on September 20th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 9:53 am

QuoteOriginally posted by: AnnaBeginsThanks.In the first equation if P(t) = 0, the log function cannot be calculated.---- I can get round this by setting P(t) = 0.001For the short positions, it looks like I am inserting the short position before taking the log. i.e. If P(t) = 4 and P(t-1) = 1, my engine is trying to calculate ln((-4)/1) = undefined. If I calculate the log return (ln(4/1)) - and then insert the short position I should avoid the error....Would you agree?Thanks again,ABfirst off why is P(t) = 0 ? lets take an example. Assume you have $100 in cash and that you then purchase 1 share of stock A worth $100 and sold short 1 share of stock B at $100your portfolio is = 100 + 100 (valueof stock A) - 100 (proceeds of short sale)lets say tomorrow A drops to 90, B rallies to 110 then your portfolio is now worthportfolio = 100 + 90 - 110 = 80 the return on your portfolio is = 80/100 - 1 = -20% day 2 A miraculously rallies to 120 and B falls to back 100P = 100 + 120 - 100 = 120your return for period 2 = 120/80 - 1 = 50%repeat ad nauseum hth
Last edited by daveangel on September 20th, 2007, 10:00 pm, edited 1 time in total.
knowledge comes, wisdom lingers
 
User avatar
AnnaBegins
Topic Author
Posts: 0
Joined: January 9th, 2004, 8:27 am

Calculating volatility for long/short portfolio

September 21st, 2007, 10:07 am

interesting point....we don't force the user to insert a cash holding along with short positions in our model.... but maybe we should....We are typically looking over longer horizons (1 year or more) and hence the probability of P(t) going to zero (or 4) is non-zero.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 11:17 am

your point is even more inteersting ... so there is no capital supporting the risk in your portfolio ?
Last edited by daveangel on September 20th, 2007, 10:00 pm, edited 1 time in total.
knowledge comes, wisdom lingers
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 11:19 am

Including the cash position is important and it does help, but it does not address AnnaBegins' original point of calculating volatility in situations where a portfolio's value can go negative. To reuse the example:Assume you have $100 in cash and that you then purchase 1 share of stock A worth $100 and sold short 1 share of stock B at $100your initial value is Portfolio[0] = 100 + 100 (valueof stock A) - 100 (proceeds of short sale) = 100lets say that in period 1, A rallies to 160 and B drops to 50.Portfolio[1] = 100 + 160 - 50 = 210, Return[1] = 210/100-1 = 110%, Log-Return[1] = ln(210/100) = 74%lets say that in Period 2, A drops to 51, B rallies to 230 then your portfolio is now worthPortfolio[2] = 100 + 50 - 171 = -21, Return[2] = -21/210-1 = -110%, Log-Return[2] = ln(-21/210) = ???The point is that a log returns model may unusable if a portfolio can take on a negative value (i.e, liabilities exceed assets) which can happen whilst short selling or trading derivatives. Unfortunately, the linear-returns model has less than idea properties, too. If I see a +110% return in one period and a -110% return in the second period, what is my "average" return across the two periods? Arithmetically, it looks like it's 0%, but in reality, the total (2-period) portfolio return is actually -21/100-1 = -121% which suggests that the average might be -60.5%. The problem is that returns in the linear model are not sequentially additive (even for more modest period-to-period variations), which suggests that the summations one does for computing averages and variances are suspect, too.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 11:43 am

the most you can lose in one period is 100%, so seeing -110% is a bit farcical.I do not know of any trading account or broking arrangement that allows you to run a deficit. You capital cannot be less than or equal to zero unless your risk is zero as well.
knowledge comes, wisdom lingers
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Calculating volatility for long/short portfolio

September 21st, 2007, 1:34 pm

Well -- buy a stock that goes bankrupt with no recovery -- then your final capital is zero -- happens all the time.If would be a perfectly reasonable brokerage arrangement to allow this zero unless you wanted to continue trading.The point is that the lognormal std. deviation idea is not quite compatible with bankruptcy and bankruptcy is real. You have to accept this std. dev. as +infty under those events, or define it as the vol. conditional under nobankruptcy. Same issues apply to a long/short portfolio -- the main issue for AnnaBegins is "does my simulationhave a bankruptcy event with strictly positive probability?". If it does, then running the simulation long enough willtrigger it. Personally, I would then organize the simulation output into (i) the frequency of bankruptcy plus(ii) the distribution of returns, conditional on no bankruptcy. The log. std dev. can then be applied to the latter. regards,
Last edited by Alan on September 20th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 1:58 pm

QuoteWell -- buy a stock that goes bankrupt with no recovery -- then your final capital is zero -- happens all the time.indeed your return will be -100% - I dont have a problem with that.but if you bought $200 of stock and posted $100 of margin and should the stock then go to zero, you are only on hook for $100 and so your loss is still 100%. Whoever provided you the margin on the balance is on hook for the rest. Thats why they charged you interest.
knowledge comes, wisdom lingers
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Calculating volatility for long/short portfolio

September 21st, 2007, 2:02 pm

Actually, I think most brokerage loans of this type are full recourse.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 2:10 pm

full recourse to whom ? I dont see many hedge fund investors being on the hook beyond their investments in the fund. sure full recourse to the fund .. but if the fund has zero value you are on the hook.
knowledge comes, wisdom lingers
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Calculating volatility for long/short portfolio

September 21st, 2007, 2:29 pm

I am talking about stock loans extended to brokerage customers by brokers (under Reg T in the US.)This is your example: "you bought $200 of stock with $100 ..."
Last edited by Alan on September 20th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Calculating volatility for long/short portfolio

September 21st, 2007, 2:48 pm

if the customer is able to make the margin call then clearly his capital is not 100 and his return on capital will be less than 100 ... for example lets say his savings are 200, he open a brokerage account and posts 100, buys stock for 200 and borrows 100 - stocks goes to zero, his broker calls him up for the 100 and he pays him out of the balance of his savings. his return is still -100%. we are meandering.
knowledge comes, wisdom lingers
 
User avatar
AnnaBegins
Topic Author
Posts: 0
Joined: January 9th, 2004, 8:27 am

Calculating volatility for long/short portfolio

September 21st, 2007, 2:53 pm

Folks,Thanks for your comments.... I will follow your advice Alan and calculate the standard deviation of those returns which have not caused bankruptcy (and set the simulations that do end in bankruptcy to -99.99%)Cheers,AB