how to plot the payoff of an call/put option with matlab
조회 수: 6 (최근 30일)
이전 댓글 표시
how can I plot:
- intrinsic value of a call/put option in matlab?
- how can I plot the call/put value including the time value?
Additionally, I would like to plot delta, gamma, vega, etc. for several strikes and time to maturity, is that possible?
thanks for your help
댓글 수: 2
the cyclist
2013년 3월 23일
All of this is possible in MATLAB, but your question is far too general. We have no idea knowing what you already understand (and don't understand) about this problem.
For example, do you know anything at all about plotting in MATLAB? (Would you know how to plot the line y = 2*x?)
How much do you understand about options? Do you know and understand the formulas for the values?
I suggest you try to break down your question into small chunks that will be easier for people to digest and help you answer. You should show what coded you have written for yourself as well.
채택된 답변
the cyclist
2013년 3월 23일
편집: the cyclist
2013년 3월 23일
The Financial Toolbox has formulas for option prices [e.g. blsprice() for Black-Scholes model option pricing]. You can see the complete list of functions here:
If you don't have that toolbox, then you might find something you can use in the File Exchange. Here's one:
(But I have no idea if it is any good.)
댓글 수: 14
the cyclist
2013년 3월 24일
You can add text to a specific place on the plot using text function.
help text
for details.
I forgot about this when you asked about arrows earlier. You can do this using the annotation() command.
For example,
annotation(gcf,'doublearrow',[0.2 0.3],[0.3 0.5])
It is a little annoying that annotations use figure coordinates rather than axis coordinates. Read this for details:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Price and Analyze Financial Instruments에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!