for i = 1 : NRepl Path = AssetPaths( S0,r,sigma,T,NStep,1); Path = AssetPaths( S0,r,sigma,T,NStep,1); if ud == 0 % up if ud == 0 % up tcross = min(find(Path.

Slides:



Advertisements
Similar presentations
S-shaped growth Flowers. dA / dt = r * A * (K-A) / K If A
Advertisements

Il Barbiere Addormentato (versione con Monitor) type salone = monitor var poltronaoccupata, barbieredorme : boolean slibere :integer sedia, taglia, sveglia:
Naredba If..Then..Else... Procedure TForm1.Button1Click ( SEnder: Tobject ); Var x, y, Max : Integer; Begin x := StrToInt ( Edit1.Text ); y := StrToInt.
Senior Q2 Shy Tortoise. Sample >>> > > >>
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
1 Global State $500$200 A B C1: Empty C2: Empty Global State 1 $450$200 A B C1: Tx $50 C2: Empty Global State 2 $450$250 A B C1: Empty C2: Empty Global.
Scientific Programming for(i=0; i b) { a = func1(c,d,i*10); } else if(a < b) { a = func2(e,f,i*10); } else { a = func3(g,h,i*10);
Assoc. Prof. Yeşim Kuştepeli1 GAME THEORY AND APPLICATIONS DOMINANT STRATEGY.
金融商品設計與評價hw11 計財系大三 林奕全.
1 Symmetrical Pair Scheme: a Load Balancing Strategy to Solve Intra- movie Skewness for Parallel Video Servers Song Wu and Hai Jin Huazhong University.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
L1 Supplementary Notes Page 1 Selection Sort Comparison Counting.
Longest Common Subsequence (LCS) Dr. Nancy Warter-Perez.
1 PATH TESTING An Example for White-Box Testing. 2 Path testing a form of white box testing steps to complete: –derive the module’s flow diagram –describe.
Dynamic Programming Code
Longest Common Subsequence (LCS) Dr. Nancy Warter-Perez June 22, 2005.
A Basic Options Review. Options Right to Buy/Sell a specified asset at a known price on or before a specified date. Right to Buy/Sell a specified asset.
S A B D C T = 0 S gets message from above and sends messages to A, C and D S.
Shortest Path Algorithm (Chandy-Misra 1982): Model and Pseudo Code ididi Smallest Model © Béat Hirsbrunner, University of Fribourg, Switzerland, 1995,
Switching Converter Boost Converter Buck/Boost Converter Buck Converter + V IN - + V OUT - I IN IOIO.
HW8. OIL BOND OIL BOND - CODE S = 30; r = 0.02; sigma = 0.06; T = 1; N = 10; deltaT = T/N; u = exp( sigma * sqrt(deltaT) ); d = 1/u; p = ( exp( r * deltaT.
金融商品設計與評價 HW5 潘承瑄 TriEurPut S0=50; X=50; r= ; T=6/12; sigma=0.2; N=8; lamda= ; [price, lattice] = TriEurCall(S0,X,r,T,sigma,N,lamda)
The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they can carry.
& 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem Thanks to Jim Orlin & MIT OCW.
Creating Shortcuts On the Desktop. Creating Shortcuts to programs Many programs create their own desktop shortcuts when installed. A desktop icon with.
1 Bresenham’s Circle Algorithm Define:D(s i ) = distance of p 3 from circle D(t i ) = distance of p 2 from circle i.e.D(s i ) = (x i + 1) 2 + y i 2 – r.
Binomial Price Evolution S(0) asset price at start (now) S d = S(0) D asset price one period later, if the return is negative. S d = S x D example: D =
if( min( find( tryV
Fundamentals of Perfect Developer A one-day hands-on tutorial Answers to Exercises.
MODELING WITH QUADRATIC FUNCTIONS 4.3 NOTES. WARM-UP The path of a rocket is modeled by the equation How long did it take the rocket to reach it’s max.
Cycle Canceling Algorithm
CSCE 210 Data Structures and Algorithms
Prime and composite numbers
DERIVATIVES: Valuation Methods and Some Extra Stuff
P(T1, T2) - F(t, T1: T2) P(T1, T2) F(t, T1: T2) F(t, T1: T2) Figure 3.1: Payoff Diagram for a Forward Contract with Delivery.
درس طراحی الگوریتم ها (با شبه کد های c ++)
Scatter Plot Add your comments here..
تهیه و تنظیم: فاطمه قاسمی دانشگاه صنعتی شریف – پاییز 86
Decision Theory.
Бірөлшемді жиымдар Паскаль тілінде бағдарламалау
دورة حياة تطوير النظم system development life cycle
Graph Partitioning Problems
Global state collection
optimal basis will not change
Derivatives are slopes…
TSN in OmniRAN Max Riegel (Nokia)
Network Flows – Multiple sources and sinks
Hmjngj jxhngh.
CSC215 Homework Homework 03 Due date: Oct 07, 2016.
optimal basis will not change
Section 1 Distance and Displacement
Паскаль тілінің басқару
Network Flow CSE 373 Data Structures.
Advanced LP models column generation.
Introduction to Maximum Flows
Set Representation S1={0, 6, 7, 8}, S2={1, 4, 9}, S3={2, 3, 5}
Regular Grammars.
A toy example for RC4.
CIS 720 Lecture 3.
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
Introduction to Maximum Flows
CIS 720 Lecture 3.
M254 Cup 2 Go Screw Top Cup :: 356ml
Dynamic Programming.
M243 Cup 2 Go Screw Top Cup :: 356ml
CIS 720 Lecture 4.
Max Flows 3 Preflow-Push Algorithms
Number of treatments ____________________________________________
Presentation transcript:

for i = 1 : NRepl Path = AssetPaths( S0,r,sigma,T,NStep,1); Path = AssetPaths( S0,r,sigma,T,NStep,1); if ud == 0 % up if ud == 0 % up tcross = min(find(Path >= Sb)); tcross = min(find(Path >= Sb)); else % down else % down tcross = min(find(Path <= Sb)); tcross = min(find(Path <= Sb)); end end if not(isempty(tcross)) if not(isempty(tcross)) Ncross = Ncross + 1; Ncross = Ncross + 1; Times(Ncross) = (tcross-1) * dt; Times(Ncross) = (tcross-1) * dt; StockVals(Ncross) = Path(tcross); StockVals(Ncross) = Path(tcross); end endend

else else Payoffs(i) = 10; Payoffs(i) = 10; end endend [payoff, var, CI] = normfit(Payoffs); end

for i = N : -1 : 1 for i = N : -1 : 1 for j = 0 : i-1 for j = 0 : i-1 S(j+1) = max(10, exp(-r*deltaT) * ( S(j+1)*p + S(j+2)*(1-p) ) ); S(j+1) = max(10, exp(-r*deltaT) * ( S(j+1)*p + S(j+2)*(1-p) ) ); end end lattice(1:i,i) = S(1:i); lattice(1:i,i) = S(1:i); end end payoff = S(1); payoff = S(1);end