Presentation is loading. Please wait.

Presentation is loading. Please wait.

video Asian Option 20 periods’ pay-off stock’s up/down determined by mean and volatility u – up price jump d - down price jump Asian Option Pricing.

Similar presentations


Presentation on theme: "video Asian Option 20 periods’ pay-off stock’s up/down determined by mean and volatility u – up price jump d - down price jump Asian Option Pricing."— Presentation transcript:

1

2 video

3

4

5 Asian Option 20 periods’ pay-off stock’s up/down determined by mean and volatility u – up price jump d - down price jump Asian Option Pricing Algorithm Stock price 1.Using Monte-carlo simulation to generate sample paths for a stock S, P is the probability for the stock to go down rand var > P : S up rand var<= P: S down 2. Calculate payoff up : payoff += S * u down : payoff -= S* d 3. Repeat 1 and 2 1M times and calculate the average payoff 4.Use risk-neutral rate to discount the Asian Option payoff: price = payoff / R n

6 Asian Option Pricing Algorithm 1.Using Monte-carlo simulation to generate sample paths for a stock S, P is the probability for the stock to go down rand var > P : S up rand var<= P: S down 2. Calculate payoff up : payoff += S * u down : payoff -= S* d 3. Repeat 1 and 2 N times and calculate the average and payoff 4.Use risk-neutral rate to discount the Asian Option payoff: price = payoff / R n // Randomly generate 1000,000 paths for (int index = 0; index < ; index++){ double sumPricePath = initial; // generate a path of 20 periods for (int i = 1; i <= 20; i++){ pricePath[0] = initial; double rn = rand.NextDouble(); if (rn > pidown ){ pricePath[i] = pricePath[i - 1] * up; } else{ pricePath[i] = pricePath[i - 1] * down ; } sumPricePath += pricePath[i]; } priceAverage = sumPricePath / (periods + 1); callPayOff = Math.Max(priceAverage-exercise, 0); temp += callPayOff; } temp /= runs; // average payoff return temp / Math.Pow(interest, periods);

7 demo

8 Complete and integrated platform for computational clustering Built on top of the proven Windows Server 2008 platform Integrated development environment, Visual Studio Windows Server 2008 HPC Edition Secure, Reliable, Tested Support for high performance hardware (x64, high-speed interconnects) HPC Pack 2008 HPC SOA Platform Job Scheduler Cluster Management Message Passing Interface Microsoft Windows HPC Server 2008 Integrated Solution out-of-the-box Leverages investment in Windows administration and tools Makes cluster operation easy as a single box Available from

9 Relationship among Processing Elements Program Structure

10 Tightly-coupled Loosely-coupled Relationship Among Processing Elements Program Structure Data-driven data-parallel Compute-driven Loop-parallel Search Data-mining Seismic Crash Sim Structure Analysis Weather Solutions PLINQ (Multi-core) Dryad-LINQ (Scale-out) Solutions TPL (Multi-core) HPC SOA (Scale-out) Parametric Sweep jobs (Scale-out) Solutions OpenMP (Multi-core) MPI (Scale-out) Focus of this session Real-time Risk VaR Excel UDF Actuarial processing Derivative Product pricing DCC Rendering Genetic algorithms Gene Sequencing

11 HPC SOA API Asian Option Pricing Algorithm 1.Using Monte-carlo simulation to generate sample paths for a stock S, P is the probability for the stock to go down rand var > P : S up rand var<= P: S down 2. Calculate payoff up : payoff += S * u down : payoff -= S* d 3. Repeat 1 and 2 N times and calculate the mean payoff 4.Use risk-neutral rate to discount the Asian Option payoff: price = payoff / R n Visual Studio Tools for Office

12 1.Which distributed computing framework to use? 2.How to host the calculation logic on the compute nodes? 3.How do I invoke the calculation remotely? 4.How do I debug my services on the compute nodes, printf()? 5.Remote invocations incur high overhead, do you have any performance tips? 6.When I move to the cloud, do I have to use a new API?

13 ClientService Message ABCABC ABC AddressBindingContract (Where)(How)(What)

14 Visual Studio Build Deploy Client Service DLLs Package Run Developers Administrators Dev / Test environment Production environment Users Install Copy Service DLLs Register Service Service Deployment

15 service DLLs service DLLs service DLLs service DLLs service DLLs 文件服务器 Local Deployment Service DLLs on the local drives High Perf Hard to update Often used for ISV apps Central Deployment Service DLLs on central file servers Easy to update Perf limited to the file server scalability Often used for in-house apps service DLLs File server service DLLs Hybrid Deployment Frequently updated dlls on central server Other dlls on local drives Often used for apps that use ISV’s services as well as in-house services File server service DLLs service DLLs service DLLs

16 demo

17

18

19

20 Broker HTTP NetTcp Custom HpcServiceHost WCF Wrappper Service Native DLL Custom Service Custom Service

21

22 Round-trip latency

23 Number of Service Instances N 1 The Nth service instance: Start processing 1 st call End processing 1 st call Start processing 2 nd call End processing 2 nd call time 2 3 4

24

25

26

27

28

29 // Service Application [ServiceContract] public interface IService1 { [OperationContract] string Echo(string); } class Service1 : IService { public string Echo (string input) { return Environment.MachineName + ":" + input; } Interactive Connected applications request response Client Process (Send requests) request Client Process (Get responses) response HPC Svr 2008 R2 Request & reply Fire & Recollect

30 Which Distributed Computing Framework to use? WCF – the framework and tools support How do I host service on compute nodes HPC Service deployment (compute-node, central and hybrid modes) How to invoke remove methods? Async method invocation or SendRequests()/GetResponses() – new in R2 How to debug services on the compute nodes Using VS HPC SOA debugger add-in Remote invocation is higher, do you have any performance tips Use SSI to measure your performance goal Right granularity, reduce message sizes Do I have to use a new API when moving to the cloud? No, we preserve your investment in HPC Server

31

32

33

34 Built by Developers for Developers….

35


Download ppt "video Asian Option 20 periods’ pay-off stock’s up/down determined by mean and volatility u – up price jump d - down price jump Asian Option Pricing."

Similar presentations


Ads by Google