辅导ULSB留学生、讲解C++语言、辅导C++编程语言、讲解strike 辅导留学生Prolog|讲解R语言编程
- 首页 >> 其他 ULSB Assessment Brief
The Black-Scholes formula to calculate the price (p) of a European put option on a non-dividend-paying stock is with and where
S is the spot price of the underlying stock.
K is the exercise (strike) price.
r is the risk free interest rate.
is the volatility of the underlying stock.
(T-t) is the time to maturity (measured in years).
N(.) is the cumulative normal distribution.
For a given price of the option, , the implied volatility is the value of such that the value of price of the option given by the Black-Scholes formula is equal to .
Exercises:
1.(25%) Write a function to evaluate the price of this option.
2.(35%) Write an algorithm to obtain the implied volatility using the Newton-Raphson method. This algorithm should be in a separate function.
3.(20%) Program the algorithm such that it terminates with value 0 if convergence is achieved, with value 1 if convergence is not achieved after 1000 iterations and with value 2 if the variance converges to a negative value.
4.(20%) Write your program so that it asks the user to input the information that the algorithm needs to work in a meaningful way, and so that it shows the following information in the console:
a.The characteristics of the option.
b.The value of the implied volatility.
c.The number of iterations to achieve convergence.
d.The termination status and its meaning.
NOTES: Use as initial value = ()/(0.398). To evaluate the normal cdf you can use the following function:
double N(const double& z) {
if (z > 6.0) { return 1.0; };
if (z < -6.0) { return 0.0; };
double b1 = 0.31938153;
double b2 = -0.356563782;
double b3 = 1.781477937;
double b4 = -1.821255978;
double b5 = 1.330274429;
double p = 0.2316419;
double c2 = 0.3989423;
double a=fabs(z);
double t = 1.0/(1.0+a*p);
double b = c2*exp((-z)*(z/2.0));
double n = ((((b5*t+b4)*t+b3)*t+b2)*t+b1)*t;
n = 1.0-b*n;
if ( z < 0.0 ) n = 1.0-n;
return n;};
You must upload your source file (file with extension .cpp) to Turnitin by the day and time indicated in the coversheet. This the second of the three pieces of coursework that you should submit during the semester. This coursework is worth 25% of your total mark to the module.
Getting Started!
You can use the examples in the lectures and seminars as starting point as a reference point to understand the use of the tools needed to solve this coursework. Although the concept of implied volatility should be clear enough with the explanation given, you can explore it a little further in the following textbooks:
-Hull, J., 2012, Options, futures and other derivatives, eighth edition, Pearson.
-Hull, J., 2015, Risk management and financial institutions, fourth edition, Wiley
The Newton Raphson Method is described, for example, in the following books:
-M.J. Capinski and T. Zastawniak (2012), Numerical Methods in Finance with C++. Cambridge University Press.
-D.J. Duffy (2004), Financial Instrument Pricing Using C++. Wiley Finance.
Mark Postgraduate Grade Descriptor
85-100% Scholarship: Excellent application of a rigorous and extensive knowledge of subject matter; perceptive; demonstrates a critical appreciation of subject and extensive and detailed critical analysis of the key issues; displays independence of thought and/ or a novel and relevant approach to the subject; reveals both breadth and depth of understanding, showing insight and appreciation of argument.
Independent learning: Work draws on a wide range of relevant literature and is not confined to reading lists, textbooks or lecture notes; arguments are well supported by a variety of means.
Writing skills: Writing skills are excellent; writing is clear and precise; arguments are logical, well-structured and sustained, and demonstrate thorough understanding; conclusions are reasoned and justified by evidence.
Analysis: Work demonstrates a robust approach to analysis that is evident of a deep understanding of relevant concepts, theories, principles and techniques. For quantitative modules analysis is complete and entirely relevant to the problem.
70-84% Scholarship: Very good application of a rigorous and extensive knowledge of subject matter; demonstrates a critical appreciation of subject; displays detailed thought and consideration of the subject; reveals very good breadth and depth of understanding.
Independent learning: Work draws on a range of relevant literature and is not confined to reading lists, textbooks or lecture notes.
Writing skills: Writing skills are well-developed; writing is clear and precise; arguments are logical, well-structured and demonstrate thorough understanding; conclusions are justified by evidence.
Analysis: Analytical steps carried out carefully and correctly demonstrating that it is based on a sound understanding. Analysis is relevant to the problem and is complete and is placed in a clear context.
60-69% Scholarship: Good, broad-based understanding of subject manner; makes effective use of understanding to provide an informative, balanced argument that is focussed on the topic; reveals some attempt at creative, independent thinking; main points well covered, displaying breadth or depth but not necessarily both; broadly complete and relevant argument;
Independent learning: Sources range beyond textbooks and lecture material and are used effectively to illustrate points and justify arguments.
Writing skills: Arguments are presented logically and coherently within a clear structure and are justified with appropriate supporting evidence; capably written with good use of English throughout; free from major errors; complex ideas are expressed clearly and fluently using specialist technical terminology where appropriate.
Analysis: Some minor slips in the steps of the analysis and some minor gaps in understanding of underlying principles. Analysis is relevant to the problem and mostly complete. A good interpretation which conveys most of its meaning.
50-59% Scholarship: Some but limited engagement with, and understanding of, relevant material but may lack focus, organisation, breadth, and/or depth; relatively straightforward ideas are expressed clearly and fluently though there may be little or no attempt to synthesise or evaluate more complex ideas; exhibits limited independent creative thought; adequate analysis but some key points only mentioned in passing; arguments satisfactory but some errors and perhaps lacking completeness and relevance in parts.
Independent learning: Sources restricted to core lecture material with limited or no evidence of wider reading.
Writing skills: The question is addressed in a reasonably clear, coherent and structured manner but some sections may be poorly written making the essay difficult to follow, obscuring key points or leading to over-generalisation; competently written with a good use of English throughout (few, if any, errors of spelling, grammar and punctuation). Answers that have merit class qualities may fall into this category if they are too short, unfinished or badly organised.
Analysis: Minor slips and occasional basic errors in analysis. Underlying principles are mostly understood, but clear gaps are apparent. Analysis falls short of completeness and is a little irrelevant in place but a reasonable interpretation which goes some way to convey its meaning
45-49% Minimum requirements have not been met.
Scholarship: Inadequate understanding of key issues and concepts; some material may be used inappropriately; uninspired and unoriginal; relies on limited knowledge; analysis poor or obscure, superficial or inconsistent in places; arguments incomplete, partly irrelevant or naive.
Independent learning: Restricted to a basic awareness of course material and textbooks; meagre use of material to support assertions.
Writing skills: Poor use of English exhibiting errors. Answer may be poorly focussed on the question, lack rigour and/or consist of a series of repetitive, poorly organised points or unsubstantiated assertions that do not relate well to one another or to the question, although some structure discernible.
Analysis: Inadequate knowledge of the analysis to be followed, with frequent errors. Some attention paid to underlying principles, but lacking in understanding and frequently irrelevant. Some interpretation is given, but it does not place the analysis in any real context
40-44% Scholarship: Poor knowledge of relevant material; omission of key ideas/material; significant parts may be irrelevant, superficial or factually incorrect; inappropriate use of some material; mere paraphrasing of course texts or lecture notes; key points barely mentioned; very weak grasp or complete misunderstanding of the issues; inclusion of irrelevant material; does not address the topic or question.
Independent learning: Restricted to a basic awareness or no awareness of course material and textbooks; very meagre use of supporting material or unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Unacceptable use of English (i.e. comprehension obscured by significant and intrusive errors of spelling, punctuation and grammar); poor and unclear, or totally incoherent, structure. Answers that ‘run out of time’ or miss the point of the question may fall into this (or a lower) class.
Analysis: Erroneous analysis with mistakes. Very little attention paid to the underlying principles of the analysis. Far from complete with little relevance to the problem. Limited interpretation that reveals little, if anything, about the meaning
20-39% Scholarship: Displays a superficial appreciation of the demands and broad context of the question but is largely irrelevant, fundamentally flawed, or factually incorrect; inappropriate use of material; mere paraphrasing of course texts or lecture notes; key points barely mentioned; complete misunderstanding of the issues; inclusion of irrelevant material.
Independent learning: Restricted to a limited awareness of basic course material; unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Minimal structure, though may only list key themes or ideas with limited comment or explanation.
Analysis: Analysis has very significant omissions demonstrating little understanding of problem or underlying principles. Analysis may be ill suited to problem. Very little interpretation of meaning of the analysis.
0-19% Scholarship: No recognition of the demands or scope of the question and no serious attempt to answer it. Complete misunderstanding of the issues; inclusion of irrelevant material. May have simply failed to address the question/topic set.
Independent learning: No evidence that the most basic course material has been understood; unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Without structure; comprehension may be completely obscured by poor grammar, spelling, punctuation.
Analysis: Virtually complete failure to carry out analysis. No evidence of understanding of underlying principles and bears no relevance to the problem. No attempt to interpret or explain the meaning of the analysis.
The Black-Scholes formula to calculate the price (p) of a European put option on a non-dividend-paying stock is with and where
S is the spot price of the underlying stock.
K is the exercise (strike) price.
r is the risk free interest rate.
is the volatility of the underlying stock.
(T-t) is the time to maturity (measured in years).
N(.) is the cumulative normal distribution.
For a given price of the option, , the implied volatility is the value of such that the value of price of the option given by the Black-Scholes formula is equal to .
Exercises:
1.(25%) Write a function to evaluate the price of this option.
2.(35%) Write an algorithm to obtain the implied volatility using the Newton-Raphson method. This algorithm should be in a separate function.
3.(20%) Program the algorithm such that it terminates with value 0 if convergence is achieved, with value 1 if convergence is not achieved after 1000 iterations and with value 2 if the variance converges to a negative value.
4.(20%) Write your program so that it asks the user to input the information that the algorithm needs to work in a meaningful way, and so that it shows the following information in the console:
a.The characteristics of the option.
b.The value of the implied volatility.
c.The number of iterations to achieve convergence.
d.The termination status and its meaning.
NOTES: Use as initial value = ()/(0.398). To evaluate the normal cdf you can use the following function:
double N(const double& z) {
if (z > 6.0) { return 1.0; };
if (z < -6.0) { return 0.0; };
double b1 = 0.31938153;
double b2 = -0.356563782;
double b3 = 1.781477937;
double b4 = -1.821255978;
double b5 = 1.330274429;
double p = 0.2316419;
double c2 = 0.3989423;
double a=fabs(z);
double t = 1.0/(1.0+a*p);
double b = c2*exp((-z)*(z/2.0));
double n = ((((b5*t+b4)*t+b3)*t+b2)*t+b1)*t;
n = 1.0-b*n;
if ( z < 0.0 ) n = 1.0-n;
return n;};
You must upload your source file (file with extension .cpp) to Turnitin by the day and time indicated in the coversheet. This the second of the three pieces of coursework that you should submit during the semester. This coursework is worth 25% of your total mark to the module.
Getting Started!
You can use the examples in the lectures and seminars as starting point as a reference point to understand the use of the tools needed to solve this coursework. Although the concept of implied volatility should be clear enough with the explanation given, you can explore it a little further in the following textbooks:
-Hull, J., 2012, Options, futures and other derivatives, eighth edition, Pearson.
-Hull, J., 2015, Risk management and financial institutions, fourth edition, Wiley
The Newton Raphson Method is described, for example, in the following books:
-M.J. Capinski and T. Zastawniak (2012), Numerical Methods in Finance with C++. Cambridge University Press.
-D.J. Duffy (2004), Financial Instrument Pricing Using C++. Wiley Finance.
Mark Postgraduate Grade Descriptor
85-100% Scholarship: Excellent application of a rigorous and extensive knowledge of subject matter; perceptive; demonstrates a critical appreciation of subject and extensive and detailed critical analysis of the key issues; displays independence of thought and/ or a novel and relevant approach to the subject; reveals both breadth and depth of understanding, showing insight and appreciation of argument.
Independent learning: Work draws on a wide range of relevant literature and is not confined to reading lists, textbooks or lecture notes; arguments are well supported by a variety of means.
Writing skills: Writing skills are excellent; writing is clear and precise; arguments are logical, well-structured and sustained, and demonstrate thorough understanding; conclusions are reasoned and justified by evidence.
Analysis: Work demonstrates a robust approach to analysis that is evident of a deep understanding of relevant concepts, theories, principles and techniques. For quantitative modules analysis is complete and entirely relevant to the problem.
70-84% Scholarship: Very good application of a rigorous and extensive knowledge of subject matter; demonstrates a critical appreciation of subject; displays detailed thought and consideration of the subject; reveals very good breadth and depth of understanding.
Independent learning: Work draws on a range of relevant literature and is not confined to reading lists, textbooks or lecture notes.
Writing skills: Writing skills are well-developed; writing is clear and precise; arguments are logical, well-structured and demonstrate thorough understanding; conclusions are justified by evidence.
Analysis: Analytical steps carried out carefully and correctly demonstrating that it is based on a sound understanding. Analysis is relevant to the problem and is complete and is placed in a clear context.
60-69% Scholarship: Good, broad-based understanding of subject manner; makes effective use of understanding to provide an informative, balanced argument that is focussed on the topic; reveals some attempt at creative, independent thinking; main points well covered, displaying breadth or depth but not necessarily both; broadly complete and relevant argument;
Independent learning: Sources range beyond textbooks and lecture material and are used effectively to illustrate points and justify arguments.
Writing skills: Arguments are presented logically and coherently within a clear structure and are justified with appropriate supporting evidence; capably written with good use of English throughout; free from major errors; complex ideas are expressed clearly and fluently using specialist technical terminology where appropriate.
Analysis: Some minor slips in the steps of the analysis and some minor gaps in understanding of underlying principles. Analysis is relevant to the problem and mostly complete. A good interpretation which conveys most of its meaning.
50-59% Scholarship: Some but limited engagement with, and understanding of, relevant material but may lack focus, organisation, breadth, and/or depth; relatively straightforward ideas are expressed clearly and fluently though there may be little or no attempt to synthesise or evaluate more complex ideas; exhibits limited independent creative thought; adequate analysis but some key points only mentioned in passing; arguments satisfactory but some errors and perhaps lacking completeness and relevance in parts.
Independent learning: Sources restricted to core lecture material with limited or no evidence of wider reading.
Writing skills: The question is addressed in a reasonably clear, coherent and structured manner but some sections may be poorly written making the essay difficult to follow, obscuring key points or leading to over-generalisation; competently written with a good use of English throughout (few, if any, errors of spelling, grammar and punctuation). Answers that have merit class qualities may fall into this category if they are too short, unfinished or badly organised.
Analysis: Minor slips and occasional basic errors in analysis. Underlying principles are mostly understood, but clear gaps are apparent. Analysis falls short of completeness and is a little irrelevant in place but a reasonable interpretation which goes some way to convey its meaning
45-49% Minimum requirements have not been met.
Scholarship: Inadequate understanding of key issues and concepts; some material may be used inappropriately; uninspired and unoriginal; relies on limited knowledge; analysis poor or obscure, superficial or inconsistent in places; arguments incomplete, partly irrelevant or naive.
Independent learning: Restricted to a basic awareness of course material and textbooks; meagre use of material to support assertions.
Writing skills: Poor use of English exhibiting errors. Answer may be poorly focussed on the question, lack rigour and/or consist of a series of repetitive, poorly organised points or unsubstantiated assertions that do not relate well to one another or to the question, although some structure discernible.
Analysis: Inadequate knowledge of the analysis to be followed, with frequent errors. Some attention paid to underlying principles, but lacking in understanding and frequently irrelevant. Some interpretation is given, but it does not place the analysis in any real context
40-44% Scholarship: Poor knowledge of relevant material; omission of key ideas/material; significant parts may be irrelevant, superficial or factually incorrect; inappropriate use of some material; mere paraphrasing of course texts or lecture notes; key points barely mentioned; very weak grasp or complete misunderstanding of the issues; inclusion of irrelevant material; does not address the topic or question.
Independent learning: Restricted to a basic awareness or no awareness of course material and textbooks; very meagre use of supporting material or unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Unacceptable use of English (i.e. comprehension obscured by significant and intrusive errors of spelling, punctuation and grammar); poor and unclear, or totally incoherent, structure. Answers that ‘run out of time’ or miss the point of the question may fall into this (or a lower) class.
Analysis: Erroneous analysis with mistakes. Very little attention paid to the underlying principles of the analysis. Far from complete with little relevance to the problem. Limited interpretation that reveals little, if anything, about the meaning
20-39% Scholarship: Displays a superficial appreciation of the demands and broad context of the question but is largely irrelevant, fundamentally flawed, or factually incorrect; inappropriate use of material; mere paraphrasing of course texts or lecture notes; key points barely mentioned; complete misunderstanding of the issues; inclusion of irrelevant material.
Independent learning: Restricted to a limited awareness of basic course material; unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Minimal structure, though may only list key themes or ideas with limited comment or explanation.
Analysis: Analysis has very significant omissions demonstrating little understanding of problem or underlying principles. Analysis may be ill suited to problem. Very little interpretation of meaning of the analysis.
0-19% Scholarship: No recognition of the demands or scope of the question and no serious attempt to answer it. Complete misunderstanding of the issues; inclusion of irrelevant material. May have simply failed to address the question/topic set.
Independent learning: No evidence that the most basic course material has been understood; unsupported assertions; use of irrelevant or unconvincing material.
Writing skills: Without structure; comprehension may be completely obscured by poor grammar, spelling, punctuation.
Analysis: Virtually complete failure to carry out analysis. No evidence of understanding of underlying principles and bears no relevance to the problem. No attempt to interpret or explain the meaning of the analysis.