coursera compfinace course: Some R code translated to python
Used technology: python, pandas, numpy, scipy, matplotlib
I run the code interactively on ubuntu linux using the interactive iPython shell
lab1.py:
- read the sbux prices into a DataFrame object
- subsetting operations
- plot price data
- simple 1-month returns
- continuously compounded 1-month returns
- plot the simple and cc returns in 2 rows
- plot the returns on the same graph
- calculate and plot growth of $1 invested in SBUX
- save all figures to png files
probReview.py:
- discrete distribution - pdf spikeplot + cdf
- standard normal dstribution
- plot density with shaded area showing Pr(-2 <= x <= 1)
- compute quantiles
- area under normal curve
- general normal distribution
- risk-return tradeoff
- log-normal distrbution
- Value-at-Risk return, wealth, and loss distributions
monthly-returns-4panel-view.py: Plot 4 panels on monthly Continuosly Compounded returns:
- histogram
- smoothed histogram
- boxplot
- QQ plot