# MSF 503程序代做、代写Modeling Fall程序

2020/2/11 18:37:23   来源：互联网

MSF 503 Financial Modeling Fall, 2019

PROJECT 2

1.) Recall LAB 2.1 that we did in class. This time assume the average inter-trade time (or

scale) is equal to (say) 5 seconds. Write a Python program that finds the probability that

the next trade will occur between 2 and 3 seconds. Recall that the cumulative distribution

function (cdf) is F( x ) = P( X < x ). So, you will need to Google “python exponential

distribution cdf”. If you are unfamiliar with Python, use trial and error to get the right

2.) Suppose that a trading firm believes that a particular strategy will generate somewhere

MSF 503作业代做、代写Modeling Fall作业、代写Python程序设计作业、Python语言作业代做between \$-2000 and \$5000 dollars in trading profits per day with a most likely estimate

of \$1000? What is the triangular probability density function that corresponds to these

estimates? What is the cumulative distribution function? What are the mean and

variance?

EXTRA CREDIT: Write a Python program that calculates the mean and variance for this

distribution and plots the pdf on a graph. Hint: a = loc, b = loc + scale, m = loc + c ?

scale. You’ll probably want to create a “frozen RV object.”

3.) Create a Python program that prints the answers to the following questions.

? Assuming normally distributed data, what is the probability that X < 2 if μ = 0 and

σ = 3?

? Assuming normally distributed data, what is the probability that X > 16 if μ = 5

and σ = 20?

? Assuming normally distributed data, what is the probability that -5 < X < 5 if μ =

0 and σ = 5?

? Assuming normally distributed data, what is the probability that X < -3 or X > 3 if

μ = 0 and σ = 1?

4.) Consider the following data on trade sizes:

1,1,1,2,1,2,5,1,10,2,4,3,2,1,5,1,3,2,1,10,1,1,4,3,2,1,2,1,4,5,1,1,2,15,1,2,3

Create a grid as in LAB 2.4.

? If the future is like the past, what is the probability that the next trade will have a size

equal to 3?

? What is the probability that the next trade will have a size greater than 1 and less than

5?

? What is the probability that the next trade will have a size greater than 3?

5.) Assume we have a trading strategy where there is a 51% probability of making \$1 and a

49% probability of losing \$1. If I do 1000 of these trades per day, what is my expected

profit per day? What is my standard deviation of profit per day? What is the probability

of me making more than \$20 today?

• 推荐