Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Math 5076 Project 1
1. L o g o
L o g o
Trinomial Tree vs. MC
Gopher 6 Consulting: Di(Emma) Wu and Zheng Rong
2. L o g o
Agenda
AAPL stock and Option Price1
Trinomial Tree & MC from Class2
Functions from Financial Toolbox3
Comparison of Different Methods4
3. L o g o
AAPL and Option Price
❖Compare results by using different
computational finance methods with
the real option price of AAPL
▪ All data come from real market data
▪ Researches include: Yahoo Finance &
S&P Capital IQ’s Stock Report & Thomson
Reuters StockReports+
4. L o g o
Diagram (Yahoo Finance)
Data from http://finance.yahoo.com/q?s=AAPL
Implied Volatility 25.05%
5. L o g o
Research Report
S&P Capital IQ
Target
Price
Thomson
StockReports+
6. L o g o
Risk Free Interest Rate & Option
Risk Free Interest Rate:
13 WEEK TREASURY BILL (^IRX)
0.265 March 4
Choose 0.003
Those tests are recommended if
time allowed:
● Sensitivity Test
● Scenario Test
● Statistics Test
7. L o g o
Assumptions we use
Implied
σ=25.05%
S0=
103
r=0.003
Sk=
125
T=319
days
Call Option
Div & Yield=2.02%
8. L o g o
Assumptions we use
Implied
σ=27.86%
S0=
103
r=0.003
Sk=
125
T=319
days
Put Option
Div & Yield=2.02%
9. L o g o
Monte Carlo
Simulationn
Strike price Bid price Ask price Implied Volatility Expire date
call 125 2.90 3.05 25.05% 20-Jan-2017
put 125 25.50 25.90 27.86% 20-Jan-2017
Results:
Call option: We get 3.0323.
Put option: We get 25.4100.
10. L o g o
Implied Trinomial Tree
Strike price Bid price Ask price Implied Volatility Expire date
call 125 2.90 3.05 25.05% 20-Jan-2017
put 125 25.50 25.90 27.86% 20-Jan-2017
Results:
Call option: We get 3.2297.
Put option: We get 32.4783.
11. L o g o
Functions from Financial Toolbox
Generality
Robustness
Readability
stttree
StockSepc
RateSpec
STTTimeSpec
More
Flexibility
•Div
•Rf
•Structure
•Track
•Easy
Treeviewer
Standard Trinomial Tree
Usability
12. L o g o
My personal experience
Goole!
Mathworks
Begin with Mimic
Algorithm
Data Structure
Search
Help
Edit
Toolbox
13. L o g o
Matlab Code
Adjusted to Today’s Market Price
Create a StockSpec:
% Create a StockSpec
AssetPrice=102.11;
Sigma=0.2525;
Div=0.0202;
StockSpec=stockspec(Sigma,AssetPrice,'continuous',Div)
14. L o g o
Matlab Code
Adjusted to Today’s Market Price
% Create a RateSpec
StartDates = 'Mar-7-2016';
EndDates='Jan-20-2017';
Rates=0.003;
Basis=1; % Day count basis; 1 = 30/360 (SIA)
Compounding=-1; % ?1 = Continuous compounding
% Scalar value representing the rate at which the input
% zero rates were compounded when annualized. Default is 2.
RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,
'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding, 'Basis',
Basis)
15. L o g o
Matlab Code
% Create a
TimeSpec
NumPeriods = 12;
TimeSpec =
stttimespec(StartDates,
EndDates,
NumPeriods);
% Create a Standard
Trinomial Tree
STTTree=stttree(Stoc
kSpec, RateSpec,
TimeSpec)
16. L o g o
Wait, this looks like black box!
Not Really! Use edit function
For example:
Readable Code and Adjustable!
% Calculate standard probs:
Common = sqrt(dT/(12 *
Sigma0^2)) .* (BRates -
(Sigma0^2)/2);
for iLevel=1:NumLevels-1
PTree{iLevel}(1,:) = 1/6 +
Common(iLevel);
PTree{iLevel}(3,:) = 1/6 -
Common(iLevel);
PTree{iLevel}(2,:) = 2/3;
end
% Build Tree Structure
STTTree =
classfin('STStockTree');
STTTree.StockSpec =
StockSpec;
STTTree.TimeSpec =
STTTimeSpec;
STTTree.RateSpec =
RateSpecOri;
STTTree.tObs = TreeTimes';
STTTree.dObs = TreeDates';
STTTree.STree = STree;
STTTree.Probs = PTree;
17. L o g o
Option Prices
Vanilla Options
Settle = '3/7/16';
ExerciseDates = [datenum('1/20/17');datenum('1/20/17')];
OptSpec = {'call';'put'};
Strike =[125;75];
Price = optstockbystt(STTTree, OptSpec, Strike, Settle, ExerciseDates)
P=0.30013
Asian Options
Price = asianbystt(STTTree, OptSpec, Strike, Settle, ExerciseDates)
P=0.48820
LookBack OPtions
Price= lookbackbystt(STTTree, OptSpec, Strike, Settle, ExerciseDates)
P=4.2269
Most Efficient : Use load deri.mat
18. L o g o
Comparison with Real Data
Real Market Price Now:
Results From Matlab: P=3.0013
Why Different? Change Too Quick! Highly
Depend On Assumptions!
(Div & Yield, Risk-Free Interest, Volatility)
20. L o g o
Table
Basic
MC
Antithetic
MC
Implied
Trinomial Tree
Standard
Trinomial Tree
Real
price
Call 3.032
3
2.8310 3.2297 3.0031 2.98
Put 25.41
00
32.4763 25.50
21. L o g o
L o g o
Click to edit company slogan .
Gopher 6 Consulting