how to fit dividend yield and use obtained function in an integral

1 回表示 (過去 30 日間)
Daniel
Daniel 2013 年 7 月 8 日
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

採用された回答

Shashank Prasanna
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.
  4 件のコメント
Daniel
Daniel 2013 年 7 月 8 日
b(t) is an affine function in t. When it is a sum, I can integrate separately. But when I need to multiply known b(t) function by the fitted one and then integrate, how can I do it? both functions depend on t of course
Daniel
Daniel 2013 年 7 月 8 日
And can I use the function I got to compute first symbolic integral and then numerical?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSplines についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by