Getting Started on Data Analytics with Python
We are going to analyze some stock price data with the hopes of understanding
the stock market and possibly making some money (virtually or in simulation)
from the stock market.
Tools required:
1. Acquiring the data
- Where can we find some stock price data ?
- Download some stock price data ?
- What is the schema of the data ? What do the fields mean ?
- How should we organize and store the data ?
2. Visualize the data
- Plot the opening price using simple curves in matplotlib
- How to deal with datetime in python ?
- How to deal with datetime in matplotlib?
Example
- Plot the closing price and label the curves.
2.5 Code Housekeeping
- Restrict analysis to a specific time period
- Restrict analysis to a particular symbol, since we may
store multiple symbols in the same stock table.
- Introduce a commandline argument for stock symbol.
- Try out Python list comprehension
3. How do we know if the prices are on an upward or downward trend ?
- What time scale ?
- How do we compute a linear trend for the time period?
Example
- Plot a linear line that denotes the trend.
- What about using a sliding window of data and computing
the average of that window?
- Plot a n-day moving average.
4. How can we predict prices ?
- What do we use as the feature vectors
- What prices are we predicting?
- Training data vs testing data
Files