Page 1 of 1

R-Squared Question

Posted: January 22nd, 2004, 10:40 pm
by leonard
Hello,If I were to construct a spread of two fairly correlated products, say buy A and sell B and I need to know the # of contracts to trade for product B with A being 1 could I take the R-Squared of the two and then...Take (1/R-squared) - (price value of product B/price value of product A)to get the # of contracts to trade against A.Maybe this should have been in the student forum...If there is a more appropriate way (or correct way if this is way off) please let me know and I will work on that.Thank you for your help,Leonard

R-Squared Question

Posted: January 22nd, 2004, 11:35 pm
by ScilabGuru
I don't understand exactly what you are doing, but you have to regress one asset against other and to find a beta coefficentA=\alpha+ \beta B + epsbeta= cov (AB)/var(B)

R-Squared Question

Posted: January 23rd, 2004, 7:02 am
by leonard
Trust me I'm not 100% sure what I'm doing either. Though I do know what end result I'm looking for.I'm working my way off the CBOT floor, which has been my life, to something entirely new and foreign: electronic markets. This has been a real mental struggle for me so I realize this could be quite a haphazard approach/question, but I am going to give this all my effort. It's obvious that I have no mathematical or financial engineering backgroud but I'm learning enough to be dangerous.I will look into your suggestion and try to get a working solution.Thank you for your help,Leonard

R-Squared Question

Posted: January 23rd, 2004, 7:22 am
by leonard
SG,Two things...What is the eps in your equation?Also, this is for spreading index futures which is the reason I brought the pricing angle into it. (The two underlying have different point values)Thanks.Leonard

R-Squared Question

Posted: January 23rd, 2004, 7:23 am
by Johnny
LeonardI agree with ScilabGuru's answer, but I thought it might be interesting and useful to explain a little more about it. Your question is, what is the "best" number of B to sell in order to hedge a long position of 1 of A. It might give you confidence to know that this is a well-known question with a well-known answer.The first step is to specify what you mean by "best". You will end up with a trading position, or portfolio, of {Long 1 of A; Short n of B}. The conventional approach is to find the value of n that gives the minimum variance portfolio. This approach is consistent with ScilabGuru's answer. You can use high school maths to get the answer. Start with an expression for the variance of the portfolio:Portfolio variance = SigmaA^2 + (n^2).(SigmaB^2) - 2.n.Rho.SigmaA.SigmaBwhere SigmaA and SigmaB are the volatilities of A and B, Rho is the correlation coefficient between A and B. To find the minimum variance portfolio, differentiate with respect to n and set it equal to zero to give:dVar/dn = 2.n.(SigmaB^2) - 2.Rho.SigmaA.SigmaB = 0=> n = (Rho.SigmaA.SigmaB)/(SigmaB^2) .... which is Covariance(AB)/Variance(B) as ScilabGuru wrote below... or more simply ...=> n = Rho.SigmaA/SigmaBwhere n is the value of B that you need to sell short.You can get the same answer by performing a linear regression between A and B, but take care to use the returns and not the prices to get the correct answer.Hope this helps

R-Squared Question

Posted: January 23rd, 2004, 7:37 am
by leonard
Johnny,Yes, that did clarify my question quite a bit. And whoa! that will take me quite some time to work on. Wait...wait...yes a slight pain in my head already.Here we go!Thanks,Leonard

R-Squared Question

Posted: January 23rd, 2004, 7:51 am
by Johnny
Glad it helped and best of luck with it. Shout if you've got any questions.

R-Squared Question

Posted: January 23rd, 2004, 8:04 am
by leonard
There is a strong feeling I will!Thanks again.

R-Squared Question

Posted: January 23rd, 2004, 8:44 am
by flymuse
QuoteOriginally posted by: JohnnyLeonardPortfolio variance = SigmaA^2 + (n^2).(SigmaB^2) - 2.n.Rho.SigmaA.SigmaBI thought the coefficients for Sigma were the respective weights and that the last term in the formula is added so you get:Portfolio variance = [1 / (1+n)]^2 . SigmaA^2 + [n / (1+n)]^2 . SigmaB^2 + 2 . [1 / (1+n)] . [ n / (1+n)] . Rho.SigmaA.SigmaBOr does it work differently for a portfolio of longs and shorts?Thanks.

R-Squared Question

Posted: January 23rd, 2004, 10:46 am
by Johnny
QuoteOriginally posted by: flymuseI thought the coefficients for Sigma were the respective weights and that the last term in the formula is added so you get:Portfolio variance = [1 / (1+n)]^2 . SigmaA^2 + [n / (1+n)]^2 . SigmaB^2 + 2 . [1 / (1+n)] . [ n / (1+n)] . Rho.SigmaA.SigmaBYour version is the same as mine other than you have divided through by (1+n) to make the weights add up to 1. I intentionally didn't do this as (a) I wanted the explanation to be as uncluttered as possible and (b) because Leonard explicitly requested the number of B to sell short for a long position of 1 of A: "I need to know the # of contracts to trade for product B with A being 1".I subtracted, rather than added the last term so that I would end up with a positive number of n to sell short. I could alternatively have used your approach and ended up, slightly confusingly, with a negative number to hold long. Although these two approaches are entirely equivalent, I thought that my way offered a more clear explanation.Hope this helps.

R-Squared Question

Posted: January 23rd, 2004, 11:18 am
by flymuse
QuoteOriginally posted by: JohnnyQuoteOriginally posted by: flymuseI thought the coefficients for Sigma were the respective weights and that the last term in the formula is added so you get:Portfolio variance = [1 / (1+n)]^2 . SigmaA^2 + [n / (1+n)]^2 . SigmaB^2 + 2 . [1 / (1+n)] . [ n / (1+n)] . Rho.SigmaA.SigmaBYour version is the same as mine other than you have divided through by (1+n) to make the weights add up to 1. I intentionally didn't do this as (a) I wanted the explanation to be as uncluttered as possible and (b) because Leonard explicitly requested the number of B to sell short for a long position of 1 of A: "I need to know the # of contracts to trade for product B with A being 1".I subtracted, rather than added the last term so that I would end up with a positive number of n to sell short. I could alternatively have used your approach and ended up, slightly confusingly, with a negative number to hold long. Although these two approaches are entirely equivalent, I thought that my way offered a more clear explanation.Hope this helps.Thanks. Your explanation certainly had less clutter than mine.

R-Squared Question

Posted: January 23rd, 2004, 1:57 pm
by ScilabGuru
Of course, I meant returns, sorry for sloppiness. eps is the noise. Both approaches seem me equivalent...

R-Squared Question

Posted: January 23rd, 2004, 2:02 pm
by Johnny
QuoteOriginally posted by: ScilabGuruOf course, I meant returns, sorry for sloppiness. eps is the noise. Both approaches seem me equivalent...SG, just out of interest, do you ever actually read any of this stuff? What did I say ..."I agree with ScilabGuru's answer ... ""=> n = (Rho.SigmaA.SigmaB)/(SigmaB^2) .... which is Covariance(AB)/Variance(B) as ScilabGuru wrote below ""You can get the same answer by performing a linear regression between A and B, ... "So I already said three times that the approaches are equivalent ...

R-Squared Question

Posted: January 23rd, 2004, 3:23 pm
by leonard
Thank you for everyone's replies as I have a lot learn. The question which I cannot seem to get over is where the price value per point is included. For example if the mini-sp futures = $50/point and the Dow = $10/point, where does this come in to the equation.Thanks Thanks Thanks,Leonard

R-Squared Question

Posted: January 23rd, 2004, 3:54 pm
by ScilabGuru
Jonny, I did!!, but not all, it is hard to read numbers without latex. And to understand that it's equivalent is simpler than to read about this