Question: I NEED R CODE FOR THIS QUESTION!! (Note: this problem won't follow the Questions/Approach/Results/Conclusions outline. See below for formatting requirements.) Suppose you have $10,000 dollars

I NEED R CODE FOR THIS QUESTION!!

(Note: this problem won't follow the "Questions/Approach/Results/Conclusions" outline. See below for formatting requirements.)

Suppose you have $10,000 dollars to invest, and that you are offered the following wager, based on the outcome of a "biased" coin flip that comes up heads with probability p = 0.52. You get to choose what fraction c of your total wealth of $10,000 to wager on the outcome of the bet. You win the bet if the coin comes up heads. So:

With probability p = 0.52, you will win the bet and therefore gain c $10, 000.

With probability 1 p = 0.48, you will lose the bet, and therefore lose c $10, 000.

Since the coin is in your favor, it sounds like a good bet, right?

Part A Suppose that you decide to risk c = 0.10 (i.e.~10%) of your wealth on this bet, and that you repeat the bet over and over again. After every single round of betting, you decide to risk the same fraction c = 0.1 of your current wealth on the next bet. In other words, if you have wt dollars after round t of betting, you place 0.1 wt dollars on the next round's wager. If you win, your new wealth will be wt+1 = (1 + c) wt. If you lose, your new wealth will be wt+1 = (1 c) wt. Thus the ending point round t = 1 becomes the starting point for round t = 2, and so on.

Simulate 10,000 rounds of this bet.1 What happens after 10,000 rounds of betting? Are you rich or broke? Run the simulation four times, in order to convince yourself of what happens here. Do you find this surprising?

To code up this simulation, we recommend that you build on our example R script from the walkthrough on Monte Carlo for sequential events. There are many ways to simulate the outcome of each bet in R code; for example, you might consider a combination of ifelse and rbinom (to simulate a binomial outcome for each round of the bet).

For this part, all you need to turn in is a single page with four plots, one each for your four simulated trajectories of wealth wt over every round from t = 1 to t = 10000 (the betting round t should be on the x-axis). Make these four plots fits on a single page, and give the panel of four plots a caption explaining what seems to happen (i.e. whether you tend to get rich or go broke). Note: your panel of four figures will look like the output of facet_wrap, but you'll probably find it easier to just copy the four plots individually and paste them on a single page in your write-up.

Part B Now repeat the simulationbut this time, you should risk only 0.5% of your current wealth (that is, c = 0.005, or 1 part in 200) at every round of betting. As before, plot four trajectories of simulated wealth wt at every step from 1 to 10,000. Now what happens after 10,000 rounds? Are you rich or broke? Again, turn in a page with four plots for your four simulated trajectories, with a single caption for the whole panel.

Part C Experiment with your Monte Carlo simulation to find a value of c that you like best in order to maximize the long-term growth of your portfolio. What value of c seems to be the best? As above, plot four trajectories of simulated wealth under your chosen value of c (all four on a single page). In your caption for this panel of figures, explain how you judged what value of c looked best to you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!