Python Program | Python

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)
  • DAX (Germany)
  • FTSE (UK)
  • HANGSENG (Hong Kong)
  • KOSPI (Korea)
  • CNX NIFTY (India)
    1. 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
    2. Verify whether returns from these broad market indices followed a  normal distribution?
    3. 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
    4. 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  
  1. 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
  2. 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!

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 non- standard package is anyway used, students should provide clear directions as to how to access and install the same. Pip installations  are preferred.

Other Deliverables

Solution Design: Write a 3-page document (1500 words or fewer) that lists the steps you would need to take to build your project. Please ensure that the document is understandable by someone with no programming background. If relevant, also include class diagrams that highlight the classes and the objects you intend to create in your program.

As you work on your code, you may find that your original solution design needs to be revised. That is perfectly fine. Redesigning your solution as you run into roadblocks or find better approaches is part of the process. In this case, please update your solution design document to reflect any changes. The solution design you submit should be the one implemented in your code.

Code: All your source code, i.e., the Python programming files.

README File: Provide all necessary instructions that will enable an end-user to install the required files and run your project.

Analysis of Results: Write a 2-page document (2000 words or fewer) analyzing the results obtained and drawing inferences and insights about the applicability of these results on trading system development for alpha generation.