awt_quant.data_fetch.yf_fetch¶
Yahoo Finance Data Fetching
This module provides a function to fetch historical stock price data from Yahoo Finance. It preprocesses the data for use in stochastic differential equation models.
- Functions:
download_data(ticker, start_date, end_date, train_test_split): Fetches and splits stock price data.
- Usage:
train_data, test_data, meta_data = download_data(“AAPL”, “2022-01-01”, “2023-01-01”, train_test_split=0.8)
Module Contents¶
- awt_quant.data_fetch.yf_fetch.download_data(ticker, start_date, end_date, train_test_split)[source]¶
Downloads stock price data from Yahoo Finance and processes it for training/testing.
- Parameters:
- Returns:
- (train_data, test_data, meta_data)
train_data (pd.DataFrame): Training set containing stock close prices.
test_data (pd.DataFrame): Testing set containing stock close prices.
meta_data (dict): Dictionary with additional information (dates, S0, T, N).
- Return type: