Releases: ActurialCapital/blocks
0.1.10
Release 0.1.10
New Transformers Added
This release introduces five new transformers, expanding the blocks
package's functionality for data preprocessing and feature engineering.
1. RSTradeEntry
- Description: This transformer generates trade signals based on the Relative Strength Index (RSI). It identifies overbought and oversold conditions using RSI thresholds.
- Parameters:
window
: The window length for calculating RSI. Default is 14.thresh
: A tuple for RSI thresholds, default is (30, 70).
- Usage:
rsi_trade_entry = RSTradeEntry(window=14, thresh=(30, 70)) signals = rsi_trade_entry.fit_transform(data_series)
2. RSInterval
- Description: This transformer generates trade signals based on RSI intervals, differentiating between overbought and oversold conditions and their transitions.
- Parameters:
window
: The window length for calculating RSI. Default is 14.thresh
: A tuple for RSI thresholds, default is (30, 70).
- Usage:
rsi_interval = RSInterval(window=14, thresh=(30, 70)) signals = rsi_interval.fit_transform(data_series)
3. FilterCollinear
- Description: This transformer removes collinear features from the dataset based on the Variance Inflation Factor (VIF).
- Parameters:
target
: The target variable to exclude from VIF calculation. Default is None.subset
: Subset of columns to consider for collinearity. Default is None.threshold
: VIF threshold above which features are removed. Default is 5.0.
- Usage:
filter_collinear = FilterCollinear(threshold=5.0) filtered_data = filter_collinear.fit_transform(dataframe)
4. LinearImputer
- Description: This transformer performs linear interpolation to impute missing values in the dataset.
- Parameters:
subset
: Subset of columns to apply interpolation. Default is None.kwargs
: Additional arguments for pandas' interpolate method.
- Usage:
linear_imputer = LinearImputer(subset=['column1', 'column2']) imputed_data = linear_imputer.fit_transform(dataframe)
5. ForestImputer
- Description: This transformer uses Random Forests to impute missing values in the dataset.
- Parameters:
- Various parameters for customizing the random forest model used for imputation.
- Usage:
forest_imputer = ForestImputer(subset=['column1', 'column2'], n_estimators=100) imputed_data = forest_imputer.fit_transform(dataframe)
Installation
To install the latest version of the blocks
package, use:
pip install blocks==0.1.10
0.1.8
Version 0.1.8 - Enhanced Tests
Summary
We are excited to announce the release of version 0.1.8 of the blocks package, which includes tests.
Tests
Added new tests using pytest to cover the newly introduced classes and methods.
Using poetry:
poetry run pytest
0.1.7
Version 0.1.7 - Enhanced Data Preprocessing and Transformation
Summary
We are excited to announce the release of version 0.1.7
of the blocks
package, which includes significant enhancements to data preprocessing and transformation capabilities. This release introduces new classes and transformers that simplify and extend the functionality of our data processing pipeline.
New Features
Preprocessing
ShiftFactor
: Apply shifting toX
whiley
remains unchanged.BasisOperation
: Perform elementary arithmetic operations between two DataFrames, including addition, subtraction, multiplication, division, and lagged operations.Filter
: Apply various filters to raw data based on specified thresholds, frequencies, and aggregation methods.
Transformers
ColumnAverage
: Calculate various types of means within a DataFrame, including simple, weighted, expanding, rolling, EMA, and grouped means.RateOfChange
: Calculate the rate of change (ROC) for financial time series data over a specified window period.Rolling
: Compute rolling statistics for each column in the DataFrame, including sum, mean, median, variance, standard deviation, min, max, quantile, custom functions, correlation, covariance, skewness, kurtosis, count, and rank.Zscore
: Calculate the Z-score for each column in the DataFrame over a specified window period.QuantileRanks
: Transform predictions into quantile-based signals based on the specified number of quantiles.Signal
: Convert ranks or numbers into investment signals.
Tests
- Added new tests using
pytest
to cover the newly introduced classes and methods.
Using poetry
:
poetry run pytest
Structure
blocks
├── __init__.py
├── base.py
├── decorators.py
├── meta.py
├── pipeline.py
├── preprocessing.py
└── transformers.py
0.1.6
Release Notes - Version 0.1.6
Patch Update
Model
VectorRegressor
: Fix model by removing output_pandas_dataframe
Note
pytest is work in porgress ~0.1.7
0.1.5
Release Notes - Version 0.1.4
Patch Update
Model
VectorRegressor
: Fix model with NaNs
Note
pytest
is work in porgress ~0.1.6
0.1.4
Release Notes - Version 0.1.4
Minor Update
New Features
BlockUnion
: Introduced a new feature BlockUnion
which outputs a pandas DataFrame. This functionality enhances the sklearn
FeatureUnion
processing capabilities by allowing users to combine multiple data blocks into a single DataFrame instead of using hstack
.
Patch Update
Enhancements
BaseTransformer
: Added a fit method to the BaseTransformer
class. This patch improves the extensibility of BaseTransformer
, enabling it to be more easily integrated with other components (e.i. Pipeline
) that require a fitting process.
0.1.3
Fix BaseTransformer.
0.1.2
Fix bug in make_block_pipeline.
0.1.1
Fix bug in make_block_pipeline.
0.1.0
Genesis.