Linear Regression with two variables
3 views (last 30 days)
Show older comments
I am working with a data set of Volatility Swap prices, i.e. a matrix, where the rows represent dates, the columns maturities and the entries prices. My goal is now, to find coefficients and two functions, such that
a+b*v_t+c*v'_t = V_t(t+T)
where I know the right hand side from the data and try to find v_t and v'_t. I can fix the parameters a,b and c and minimize over the error at the end, but I do not know, how I can program Matlab to find the best data points v_t and v'_t for t running through time.
1 Comment
Ingrid
on 11 May 2015
I do not know how to do this but I know the CAPTAIN toolbox provided functionalities for fitting when dealing with time series so you might want to google this to see if it suits your needs
Answers (2)
Torsten
on 11 May 2015
So a, b, c, V_t(t+T) are given und you search for (time-varying) v_t and v'_t to make
a+b*v_t+c*v'_t = V_t(t+T)
?
Choose v_t = 0 and v'_t = (V_t(t+T)-a)/c.
I guess this is not what you want, but you will have to explain more clearly what you are trying to do.
Best wishes
Torsten.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!