Book Image

Python for Finance

By : Yuxing Yan
Book Image

Python for Finance

By: Yuxing Yan

Overview of this book

Table of Contents (20 chapters)
Python for Finance
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Exercise


1. What is the usage of the module called Pandas?

2. What is the usage of the module called statsmodels?

3. How can you install Pandas and statsmodels?

4. Which module contains the function called rolling_kurt? How can you use the function?

5. Based on daily data downloaded from Yahoo! Finance, find whether IBM's daily returns follows a normal distribution.

6. Based on daily returns in 2012, are the mean returns for IBM and DELL the same? [Hint: you can use Yahoo! Finance as your source of data].

7. How can you replicate the Jagadeech and Tidman (1993) momentum strategy using Python and CRSP data? [Assume that your school has CRSP subscription].

8. How many events happened in 2012 for IBM based on its daily returns?

9. For the following stock tickers, IBM, DELL, WMT, ^GSPC, C, A, AA, MOFT, estimate their variance-covariance and correlation matrices based on the last five-year monthly returns data, for example, from 2008-2012. Which two stocks are strongly correlated?

10. Write a Python program...