Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do problem 9 in R Studio. 2.4.2 Simulations Hedge funds can earn high profits through the use of leverage, but leverage also creates high

image text in transcribedimage text in transcribedimage text in transcribedPlease do problem 9 in R Studio.

2.4.2 Simulations Hedge funds can earn high profits through the use of leverage, but leverage also creates high risk. The simulations in this section explore the effects of leverage in a simplified setting. Suppose a hedge fund owns $1,000,000 of stock and used $50,000 of its own capital and $950,000 in borrowed money for the purchase. Suppose that if the value of t any trading day then the hedge fund will sell all the stock and out its $50,000 investment. The hedge fund is said to be leveraged 20:1 since its position is20 times the amount of its own cspital invested. he stock falls below $950,000 at the end of repay the loan. This will wipe Suppose thst the daily log returns on the stock have a mesn of 0.05/year and a standard deviation of 0.23/year. These can be converted to rates per trading day by dividing by 253 and v253, respectively. Problem 4 What is the probability that the value of the stock urill be belou $950,000 at the close of at least one of the nert 45 tmding days To anaer this queation, run the code below. niter-1e5 2 below-rep(0, niter) # set up torage set-seed( 2009) 4 for (i in 1:niter) nanber of iterations G rmorn (45, nean -0.05/253, sd-0.23/sqrt (253)) # generate random numbers logPrice log(1e6)+ cunsun(r) 9 mnlogp _ nin(logPrice) # minimum price over next 45 days t belou[i]-an.nuneric(minlog? log(950000)) 12 mean(belou) On line 10, belou [i] equals 1 if, for the ith simulation, the minimum price over 45dsys is less thst 950,000. Therefore, on line 12, mean (below) is the proportion of simulstions where the minimum price is less than 950,000. If you are unfamiliar with any of the R functions used here, then use Rs help to learn about them; eg, type ?rnorm to learn that rnorm) generstes 2.4.2 Simulations Hedge funds can earn high profits through the use of leverage, but leverage also creates high risk. The simulations in this section explore the effects of leverage in a simplified setting. Suppose a hedge fund owns $1,000,000 of stock and used $50,000 of its own capital and $950,000 in borrowed money for the purchase. Suppose that if the value of t any trading day then the hedge fund will sell all the stock and out its $50,000 investment. The hedge fund is said to be leveraged 20:1 since its position is20 times the amount of its own cspital invested. he stock falls below $950,000 at the end of repay the loan. This will wipe Suppose thst the daily log returns on the stock have a mesn of 0.05/year and a standard deviation of 0.23/year. These can be converted to rates per trading day by dividing by 253 and v253, respectively. Problem 4 What is the probability that the value of the stock urill be belou $950,000 at the close of at least one of the nert 45 tmding days To anaer this queation, run the code below. niter-1e5 2 below-rep(0, niter) # set up torage set-seed( 2009) 4 for (i in 1:niter) nanber of iterations G rmorn (45, nean -0.05/253, sd-0.23/sqrt (253)) # generate random numbers logPrice log(1e6)+ cunsun(r) 9 mnlogp _ nin(logPrice) # minimum price over next 45 days t belou[i]-an.nuneric(minlog? log(950000)) 12 mean(belou) On line 10, belou [i] equals 1 if, for the ith simulation, the minimum price over 45dsys is less thst 950,000. Therefore, on line 12, mean (below) is the proportion of simulstions where the minimum price is less than 950,000. If you are unfamiliar with any of the R functions used here, then use Rs help to learn about them; eg, type ?rnorm to learn that rnorm) generstes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions