其他分享
首页 > 其他分享> > Project 2, 4CMP Spring Term 2018/19

Project 2, 4CMP Spring Term 2018/19

作者:互联网


Project 2, 4CMP Spring Term 2018/19
PROJECT 2
4CMP, SPRING TERM, PART 2: PROGRAMMING IN C++
Due Date: Sunday 31th March 2019 at 11.59 pm
Weighting: This project counts 40% to your final mark for the spring part of 4CMP.
INSTRUCTIONS FOR THE SUBMISSION:
Submit your code as a single zip file as well as single source files by the deadline on Canvas. The
program contains a main.cpp. Additional files should be logically named. Also submit one pdf
document as described below, and csv, excel or other files used to output or plot data.
The source files should compile without errors or warnings on Visual Studio 2015 as installed on the
clusters in the learning centre, and the executable should run without problems.
Plagiarism: Note that obviously group work or copying solutions from other students or sources
constitutes plagiarism and is not allowed. Please, each one of you, implement your own code!
Marking: The most important criteria for marking is the correctness of the code. It needs to compile
and run correctly, and do what you were asked to do. However, style, efficiency, readability and
formatting are also part of the evaluation criteria. In particular, if the code is so unreadable that one
cannot evaluate if it is working correctly, then you risk losing many marks for that.
PROJECT 2: VOLATILITY SURFACE AND DELTA HEDGING
Write a program with the following capabilities: The program should be able to price European put
and call options with different models. One model is the standard Black Scholes model (for which
you just need to implement the analytic formula). However, the code should be written in such was
that one can quickly price the same options with other models (see below).
Furthermore, write functionality that can read in csv files that contain time series data for option
and stock market data. Write further functionality that can determine the implied volatility of an
option from the Black-Scholes formula, given the price of the option and share as well as the other
parameters.
Then, write functionality that can perform delta hedging. This simply means that for each time you
calculate the delta for each option, and buy (sell) as many underlyings to be delta-neutral. Note that
during each time step, the price of the option, and therefore also its implied volatility, in general
change.
INSTRUCTIONS:
Download the data on Canvas for a number of European call options on the DAX30 index of 30
largest German companies, as well as the data for the DAX themselves. The data contains a Date in
the first column, given by the same integer that Excel stores for these dates. You can convert these
to dates in Excel through changing the format of the first column from general to Date, and you will
see that e.g. integer 43535 corresponds to the 11/3/2019. You do not need opening, low, high and
volume for this project, but can only work with closing prices.
Note that all options have a subscription, or cover ratio of 100. This simply means that the payoff is
0.01 of the normal payoff of an option that pays max(S-K,0). So in your code, you can simply multiply
all the option prices you read in from the csv files by the factor of 100. (Note that we are using real
data here, so I simply give you the data in the form as it is!). Note also that all of these options expire
on the 18/9/2020. Each option pricing file has the form “18092020_DAX_9500.csv”. Here, the strike
is given by K=9500.
Now, calculate the implied volatility for each option and each strike. Assume a constant interest rate
of r = 0.004 = 0.4%, assuming that the standard Black Scholes model is valid for the DAX index.
Output this volatility surface (volatility as a function of strike and expiry) into a csv file, and plot the
surface in a program of your choice. You can plot this in in 3D, but sometimes it is actually easier to
see what is happening if you plot volatility as a function of strike for several given expiries. Or
likewise, plot volatilities as a function of expiry for different given strikes. Add the plots into a
document and describe what you see. Also, calculate historical volatilities (you may use the longer
time series for DAX as given), and compare to the implied volatilities you see.
Describe the outcome of the delta hedging experiment. You may describe the outcome as follows:
Say for a given option C(t1), with given strike, on the first day, t1, you purchase the following
portfolio:
C(t1) – Delta(t1)S(t1)
Then, on day two, the portfolio is worth
(C(t2) -C(t1)) – Delta(t1)(S(t2)- S(t1))
In the next timestep you again delta hedge by adjusting your position. You may normalise your
portfolio to be a fixed amount of Euros for better comparision. Describe in the document what you
see. How good does this delta hedging work?
Finally, implement a model of your choice that can describe well the fact that volatility is varying in
both time and with strike. Price and delta hedge with this model. Describe your finding in the
document.

Project 2留学生作业代做、C++程序语言作业代做、代写Canvas作业、代做C+编程作业
Project 2, 4CMP Spring Term 2018/19
PROJECT 2
4CMP, SPRING TERM, PART 2: PROGRAMMING IN C++
Due Date: Sunday 31th March 2019 at 11.59 pm
Weighting: This project counts 40% to your final mark for the spring part of 4CMP.
INSTRUCTIONS FOR THE SUBMISSION:
Submit your code as a single zip file as well as single source files by the deadline on Canvas. The
program contains a main.cpp. Additional files should be logically named. Also submit one pdf
document as described below, and csv, excel or other files used to output or plot data.
The source files should compile without errors or warnings on Visual Studio 2015 as installed on the
clusters in the learning centre, and the executable should run without problems.
Plagiarism: Note that obviously group work or copying solutions from other students or sources
constitutes plagiarism and is not allowed. Please, each one of you, implement your own code!
Marking: The most important criteria for marking is the correctness of the code. It needs to compile
and run correctly, and do what you were asked to do. However, style, efficiency, readability and
formatting are also part of the evaluation criteria. In particular, if the code is so unreadable that one
cannot evaluate if it is working correctly, then you risk losing many marks for that.
PROJECT 2: VOLATILITY SURFACE AND DELTA HEDGING
Write a program with the following capabilities: The program should be able to price European put
and call options with different models. One model is the standard Black Scholes model (for which
you just need to implement the analytic formula). However, the code should be written in such was
that one can quickly price the same options with other models (see below).
Furthermore, write functionality that can read in csv files that contain time series data for option
and stock market data. Write further functionality that can determine the implied volatility of an
option from the Black-Scholes formula, given the price of the option and share as well as the other
parameters.
Then, write functionality that can perform delta hedging. This simply means that for each time you
calculate the delta for each option, and buy (sell) as many underlyings to be delta-neutral. Note that
during each time step, the price of the option, and therefore also its implied volatility, in general
change.
INSTRUCTIONS:
Download the data on Canvas for a number of European call options on the DAX30 index of 30
largest German companies, as well as the data for the DAX themselves. The data contains a Date in
the first column, given by the same integer that Excel stores for these dates. You can convert these
to dates in Excel through changing the format of the first column from general to Date, and you will
see that e.g. integer 43535 corresponds to the 11/3/2019. You do not need opening, low, high and
volume for this project, but can only work with closing prices.
Note that all options have a subscription, or cover ratio of 100. This simply means that the payoff is
0.01 of the normal payoff of an option that pays max(S-K,0). So in your code, you can simply multiply
all the option prices you read in from the csv files by the factor of 100. (Note that we are using real
data here, so I simply give you the data in the form as it is!). Note also that all of these options expire
on the 18/9/2020. Each option pricing file has the form “18092020_DAX_9500.csv”. Here, the strike
is given by K=9500.
Now, calculate the implied volatility for each option and each strike. Assume a constant interest rate
of r = 0.004 = 0.4%, assuming that the standard Black Scholes model is valid for the DAX index.
Output this volatility surface (volatility as a function of strike and expiry) into a csv file, and plot the
surface in a program of your choice. You can plot this in in 3D, but sometimes it is actually easier to
see what is happening if you plot volatility as a function of strike for several given expiries. Or
likewise, plot volatilities as a function of expiry for different given strikes. Add the plots into a
document and describe what you see. Also, calculate historical volatilities (you may use the longer
time series for DAX as given), and compare to the implied volatilities you see.
Describe the outcome of the delta hedging experiment. You may describe the outcome as follows:
Say for a given option C(t1), with given strike, on the first day, t1, you purchase the following
portfolio:
C(t1) – Delta(t1)S(t1)
Then, on day two, the portfolio is worth
(C(t2) -C(t1)) – Delta(t1)(S(t2)- S(t1))
In the next timestep you again delta hedge by adjusting your position. You may normalise your
portfolio to be a fixed amount of Euros for better comparision. Describe in the document what you
see. How good does this delta hedging work?
Finally, implement a model of your choice that can describe well the fact that volatility is varying in
both time and with strike. Price and delta hedge with this model. Describe your finding in the
document.

http://www.6daixie.com/contents/13/2824.html

标签:Term,4CMP,option,19,given,t1,delta,your,volatility
来源: https://www.cnblogs.com/pythonhelpyou/p/10623135.html