- Details
- Parent Category: Programming Assignments' Solutions

# We Helped With This Python Programming Homework: Have A Similar One?

Category | Programming |
---|---|

Subject | Python |

Difficulty | Undergraduate |

Status | Solved |

More Info | Online Python Help |

## Assignment Description

**Final Project **

**The
Misbehavior of Markets **

1. Write a python program(s) to download end-of-day data last 25 years the major global stock market indices from Yahoo! Finance–

• Dow Jones Index (USA)

• S&P 500 (USA)

• NASDAQ (USA)

• DAX (Germany)

• FTSE (UK)

• HANGSENG (Hong Kong)

• KOSPI (Korea)

•

CNX NIFTY (India)

2. It is a common assumption in quantitative finance that stock returns follow a normal distribution whereas prices follow a lognormal distribution. For all these indices check how closely price movements followed a log-normal distribution.

3. Verify whether returns from these broad market indices followed a normal distribution?

4. For each of the above two parameters (price movements and stock returns) come up with specific statistical measures that clearly identify the degree of deviation from the ideal distributions. Graphically represent the degree of correspondence.

5. One of the most notable hypothesis about stock market behavior is the “Efficient market hypothesis” which also internally assume that market price follows a random-walk process. Assuming that Stock Index prices follow a geometric Brownian motion and hence index returns were log-normally distributed with about 20% historical volatility, write a program sub-module to calculate the probability of an event like the 1987 stock market crash happening ? Explain in simple terms what the results imply.

6. What does "fat tail" mean? Plot the distribution of price movements for the downloaded indices (in separate subplot panes of a graph) and identify fat tail locations if any.

### Page 2

7. It is often claimed that fractals and multi-fractals generate a more realistic picture of market risks than log-normal distribution. Considering last 10 year daily price movements of NASDAQ, write a program to check whether fractal geometrics could have better predicted stock market movements than log-normal distribution assumption. Explain your findings with suitable graphs.

Students would note that this project has deliberately been
left open-ended. Instead of asking you to deliver a specific program, we wanted
you to analyze real market behavior and corresponding academic theories and
come up with your own conclusions. However, as would be ‘**Quants’ **any
decision you should ensure that any conclusion should be grounded in solid
mathematics and quantitative analytics!

All the best!

**Note: **The
submitted code should constitute a fully workable version. All relevant module
import statement should be part of the code. Students are encouraged to avoid
usage of any special python packages for the assignment and stick to using
standard python libraries mentioned as part of the course. In case such a
nonstandard package is anyway used, students should provide clear directions as
to how to access and install the same. Pip installations are preferred.