how to fit dividend yield and use obtained function in an integral
2 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I need to fit a function to the data on the dividend yield and risk free rate. Then I'll use this function to compute integrals and discount the option price. The problem is that when I fit the data with a cubic function,the fit quality is quite bad. Everyone advices to do it via cubic splines. However I don't understand how should I compute integrals afterwards, and where to get the parameters for each interval. Thanks.
Daniel
0 个评论
采纳的回答
Shashank Prasanna
2013-7-8
Use FIT from the curve fitting toolbox to fit a spline:
Scroll down for spline examples.
You can integrate and differentiate the spline once you've performed the fit.
You can also get a whole bunch of information about the spline including the once are looking for.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!