University | National University of Singapore (NUS) |
Subject | IS4303: IT-mediated financial solutions and platforms |
Problem 1.
Let X be a continuous random variable and FX(x) be its cumulative distribution function (cdf).
Question-i (5 pts): Let X be a random variable following the Rayleigh distribution with parameter σ = 1. Generate N = 100000 realizations of FX(X) (i.e., plug X into its own cdf. Note that FX(X) is a random variable). Plot the empirical cdf and plot the empirical pdf (histogram).
What is the distribution of FX(X)?
The cumulative distribution function of a Rayleigh random variable is given in the HW4 equation (1). Please set σ = 1. You can use the built-in function in Matlab (e.g., Method 2 in HW4) to generate realizations of the Rayleigh random variable.
Question-ii (5 pts): If X is a standard normal random variable (set µ = 0 and σ = 1), plot the empirical cdf and empirical pdf (histogram) of FX(X) with N = 100000. What is the distribution of FX(X)?
Hire a Professional Essay & Assignment Writer for completing your Academic Assessments
Native Singapore Writers Team
- 100% Plagiarism-Free Essay
- Highest Satisfaction Rate
- Free Revision
- On-Time Delivery
Problem 2
Use the rejection method to generate a random variable following the Shifted Gompertz distribution, denoted by X. The probability density function and the cumulative distribution function of X are:
Set b = 0.4 and η = 1. Refer to Lecture 9 for the procedure of the rejection method.
Question-i (5 pts): Find the maximum value of fX(x|b, η), i.e., max x≥0 fX(x|b, η). Denote this value by M. Report M, keeping 2 digits after the decimal point (round up, e.g., 2.10001 round up to 2.11).
Question-ii (10 pts): Note that the support of X is [0,+∞). We need to do some truncation in order to perform the rejection method. Find the value ˆx such that the probability of X being no greater than ˆx is 0.99999, i.e., FX(ˆx) , P{X ≤ xˆ} = 0.99999, Report ˆx, round up to the next nearest integer, i.e., 20.001 rounds up to 21.
Note that FX(x) (or any cumulative distribution function) is increasing in x and for the continuous random variable, like this one, the cumulative distribution function is strictly increasing in x. Hence, it is guaranteed that FX(x) = c, where c ∈ (0, 1), has a unique solution ˆx. Read the description and examples of fzero1 and find the numeric value of ˆx. Note that to use zero, you need to first make an initial guess of the solution. And if your initial guess was not good enough, the zero may break down (although theoretically speaking, this shouldn’t happen, i.e., FX(x) = c ∈ (0, 1) should always have a unique solution if X is a continuous random variable, still, there is a gap between theory and practice). You may have to try different values of the initial guess.
Question-iii (5 pts): Generate N = 100000 realizations of X using rejection method. You will need to generate many coordinates (Z1, Z2), where Z1 follows the distribution U[0,xˆ] and Z2 follows the distribution U[0, M].
Report the total number of coordinates you have used in order to generate N = 100000 realizations of X. Plot the empirical pdf (histogram) of X. Use code histogram(Data).
Question-iv (5 pts): Redo Question-iii. Set M = 0.25. Report the total number of coordinates you have used in order to generate N = 100000 realizations of X.
Question-v (10 pts): use inverse cdf method to generate N = 100000 realizations of random variable X. Plot the empirical pdf. Use code histogram(Data). Report the runtime of the inverse cdf method. You may want to use tic and toc to record the runtime of your code (see slide 19 of Lecture 9). You may also want to use parfor to reduce the runtime.
Hint: if you want to find the root of an equation, e.g., F(x) − a = 0, you can either use fzero(@(t) F(t)-a,t0), where t0 is the initial guess of the root; or you can find the minimum value of [F(x) − a]2 . This is because: if t0 makes F(t0) − a = 0, then t0, of course, minimizes [F(x) − a]2. On the contray, if you find t00 minimizes [F(x) − a] 2 and [F(t00 ) − a] 2 is very close to 0, e.g., [F(t00) − a]2 = 10−8, then t 0 0 should be the root of F(x) − a = 0. To find the minimizer of a 1 See https://www.mathworks.com/help/matlab/ref/fzero.html Author Article Short Title 3 function G2 (t), you
Problem 3.
In this problem, we will simulate the Brownian motion and set fair price for some financial derivatives via simulation. In lecture 10, we mentioned that Brownian motion can be used to model random fluctuations, in particular, the stock price movement. However, the Brownian motion can be negative sometimes while the stock price is always non-negative. Hence, we need to modify the Brownian motion a little bit.
Question-i (5 pts): Let St be the stock price at time t and assume the dynamic of St is described by the following stochastic differential equation:
DST = rStdt + σStdWt (1) where r and σ are given parameters and Wt
is the standard Brownian motion. Use the generic method given in slide 28 and 29 of Lecture 10 to simulate one sample path of St with r = 1.17, σ = 0.92 and t ∈ [0, 10]. Note that S0 = 1 and choose dt = 0.001. Plot that sample-path as a function of time t ∈ [0, 10].
Question-ii (10 pts): Generate N = 10000 sample paths of St with S0 = 1 and plot the histogram (or empirical pdf) of ST , where T = 1 and keep other parameters the same as in (i). Report the probability that ST > 10, i.e., P{ST ≥ 10}.
Question-iii (5 pts): Like what we have seen in slide 30 of Lecture 10, the stochastic differential equation (1) can be solved analytically, i.e.,
where Z is a standard normal random variable. This is based on slide 15 of Lecture 10. Wt can be viewed as Wt = Wt − W0, where W0 = 0, since Wt is a standard Brownian motion. Then by the third property of Brownian motion in slide 15 of Lecture 10, we know that Wt follows the normal distribution with mean 0 and variance t. Let S0 = 1, r = 1.17, σ = 0.92 and T = 5, generate N = 10000 realizations of Z and estimate the probability P{S5 ≥ 30}.
Buy Custom Answer of This Assessment & Raise Your Grades
Question-iv: With the expression in (iii), it is much faster to estimate the probability P{ST ≥ x} via simulation compared with the method in (ii). Now we will use simulation to give a fair price of a financial derivative: call option. Due to the “GME-Citron” event in Jan. 2021, call option has gained a lot of hype.
A call option is a contract based on the price of an asset, e.g., a stock. The holder of a call option has the right but not the obiligation to buy the underlying asset at a pre-specified price (i.e., the strike price K) at a pre-specified date (i.e., maturity T) from the party that issues the call option.
For example, the current price of a stock is S0 = $300. If you think this stock will go above $350 30 days later, then you may want to buy a call option with strike price K = $320 and T = 30. If at day 30, the price of the stock is above K = $320, e.g., S30 = $340, then this call option allows you to buy the stock at price $320 from the issuer of this call option. Then, you can immediately sell this stock at the market price $340 and hence lock profit $20. In general, the payoff of the holder of a call option at time T is ΠT , max{0, ST − K}.
Namly, only when the price of the underlying asset at the expiration date T is above the strike price K, the holder of the call option can make a profit. Now the question is, at time t = 0, what should be the fair price of this call option? Note that the fair price of a risky product today should equal to its expected discounted future value. This ensures that on average, neither the seller nor the buyer of this product will make or lose money; otherwise, either no buyers would want to buy this product, or no sellers would want to sell this product. Thus, the fair price of a call option at any given time t < T, should be C(t;T, St) = −r(T −t)E[max{0, ST − K}], (2) where r > 0 is the risk-free interest rate, e.g., assuming you make a deposit at DBS. And ST = Ste (r−σ 2/2)(T −t)+Zσ√ T −t
.
Following the method you have developed in (iii), you are now able to generate many realizations of ST , given St , r, σ. Then the expected value of a random variable can be easily computed by averaging all the realizations of that random variable.
Problem 4.
Consider the O-U process we have mentioned in the lecture dXt = (O − Xt)dt + σdWt , with X0 = 0, t ∈ [0, T]. Set O = 2, σ = 0.5 and T = 4. Set ∆t = 0.01.
Question-i (5 pt): Generate one sample path of this process. Plot the sample path as a function of time. You can use any one of the methods we have mentioned in class.
Question-ii (10 pt): What is the distribution of max t∈[0,T] Xt? This can be estimated by generating R = 100000 sample paths of Xt for t ∈ [0, T]. For each sample path, record its maximum overt ∈ [0, T]. Then plot the empirical pdf of the running maximum (set the nbins properly to make the histogram look nicer). Report the mean value of max t∈[0,T] Xt . Keep 4 digits. Report the probability that this quantity is between 1.6 and 2.1. Keep 4 digits after the decimal point, i.e.,
Question-iii (10 pt): In slide 26 of Lecture 10, we described the project initiator’s optimization problem, which is
where n0(t; p, T) follows the O-U process dn0(t; p, T) = [Oˆ − n0(t; p, T)]dt + σdWt with n0(0; p, T) = 0 for any p, T
Now the goal is to choose p and T to maximize the objective function given the constraints. Here are the value of the parameters that are given to you
Oˆ = 200 total number of ordinary backers that are interested in your project
Hˆ = 10 total number of herding backers that are interested in your project
G = 200, the goal of your fundraising campaign
r = 0.05 risk-free interest rate
vo = 2 valuations of the ordinary backers
vh = 3 valuations of the herding backers
σ = 0.3 volatility of the O-U process.
Stuck with a lot of homework assignments and feeling stressed ? Take professional academic assistance & Get 100% Plagiarism free papers
Are you Get stuck with complicated tasks on your (IS4303) IT-mediated financial solutions and platforms Assignment? then don't worry At Singapore Assignment Help, Our professional Assignment Helpers take care of all the pressures related to computer science assignments. They work 24*7 hours to provide you error-free solution on every assignment.
Looking for Plagiarism free Answers for your college/ university Assignments.
- INDIVIDUAL RESEARCH PROJECT: MERGERS AND THEIR IMPACT
- PSS388 End of Course Assessment January Semester 2025 SUSS : Integrated Public Safety And Security Management
- PSY205 Tutor-Marked Assignment 02 SUSS January 2025 : Social Psychology
- Math255 S1 Assignment-2025 SUSS : Mathematics for Computing
- BUS100 Tutor-Marked Assignment January 2025 SUSS : Business Skills And Management
- CSCXXX SUSS : New System Development Using Java : Soft Dev Pte Ltd Project
- Cloud Computing: Fundamentals, Networking, and Advanced Concepts
- COS364 Tutor-Marked Assignment January 2025 Sem SUSS : Interventions for At-Risk Youth
- FMT309 Tutor-Marked Assignment 01 SUSS January 2025 : Building Diagnostics
- HBC203 Tutor-Marked Assignment 01 January 2025 SUSS : Statistics and Data Analysis for the Social and Behavioural Sciences