stock
Bases: time_series_dataloader
A data loader for stock market time series datasets.
This class handles loading, partitioning, and preparing stock market time series data for training and testing.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of the dataset, default is 'stocks'. |
x_len |
int
|
Length of the input time series. |
y_len |
int
|
Length of the output time series. |
xy_gap |
int
|
Gap between the input and output time series. |
coverage_year_range |
int
|
Range of years covered by the data. |
time_granularity |
str
|
Time granularity of the data, e.g., 'daily', 'weekly', etc. |
target_attributes |
str
|
Target attribute to predict, e.g., 'Open', 'Close', etc. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the stock data loader with dataset-specific configurations. |
Source code in tinybig/data/time_series_dataloader.py
__init__(name=STOCK_DATA_PROFILE['name'], x_len=10, y_len=1, xy_gap=1, coverage_year_range=1, time_granularity='daily', target_attributes='Open', *args, **kwargs)
Initializes the stock data loader with specific configurations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the dataset, default is 'stocks'. |
STOCK_DATA_PROFILE['name']
|
x_len
|
int
|
Length of the input time series, default is 10. |
10
|
y_len
|
int
|
Length of the output time series, default is 1. |
1
|
xy_gap
|
int
|
Gap between the input and output time series, default is 1. |
1
|
coverage_year_range
|
int
|
Range of years covered by the data, default is 1. |
1
|
time_granularity
|
str
|
Time granularity of the data, default is 'daily'. |
'daily'
|
target_attributes
|
str
|
Target attribute to predict, default is 'Open'. |
'Open'
|
*args
|
Additional arguments for the parent class initialization. |
()
|
|
**kwargs
|
Additional arguments for the parent class initialization. |
()
|
Returns:
Type | Description |
---|---|
None
|
|