联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2019-09-10 11:26

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

answer for LAB 2.1 first.

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

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?


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp