Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.8 KB

File metadata and controls

33 lines (27 loc) · 1.8 KB

Phase Space Reconstruction of Financial Data

Overview

In this project we attempt to reconstruct the phase space of the AAPL stock based on Doyne Farmer's famous paper Geometry from a Time Series.
Namely, any time series $\{x_i\}$ may be restructured as $d$-dimensional vectors of the form

$\vec{x_i} = (x_i, x_{i+\tau}, x_{i+2\tau}, ..., x_{i+(d-1)\cdot\tau})$

where d is the embedding dimension of the phase space and $\tau$ is the time delay parameter.

Specifically, we follow the steps below:

  1. pull historical data of the selected stock using the yfinance package
  2. apply a low-pass Butterworth filter on the data, in order to extract the low-frequency signal
  3. plot the stock time-series **
  4. plot the $3$-dimensional ($d = 3$) reconstructed phase space of the time-series **
    ** applied to both initial and filtered time series

Input parameters

  • TICKER_SYMBOL (string):= ticker symbol of selected stock
  • START_DATE (string):= start date of historical data in 'YYYY-MM-DD' format
  • END_DATE (string):= end date of historical data in 'YYYY-MM-DD' format
  • CUTOFF_FREQ (float):= cutoff frequency for the low-pass filter
  • SAMPLE_RATE (float):= sampling rate of the input data used for the low-pass filter
  • ORDER (int):= order of the Butterworth low-pass filter
  • TIME_DELAY_PARAMETER (int):= time delay parameter of the phase space embedding

Dependencies

The required packages are included in file requirements.txt.
Python interpreter version used for this project: 3.9.4

Results

graphs