Useful pandas and NumPy methods

NumPy and pandas are the key tools for custom factor computations. The Notebook 00-data-prep.ipynb in the data directory contains examples of how to create various factors. The notebook uses data generated by the get_data.py script in the data folder in the root directory of the GitHub repo and stored in HDF5 format for faster access. See the notebook storage_benchmarks.ipynb in the directory for Chapter 2Market and Fundamental Data, on the GitHub repo for a comparison of parquet, HDF5, and csv storage formats for pandas DataFrames.

The following illustrates some key steps in computing selected factors from raw stock data. See the Notebook for additional detail and visualizations that we have omitted here to save some space.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.190.167