Releases: business-science/pytimetk
Releases · business-science/pytimetk
pytimetk 1.2.2
Improvements
augment_rolling_risk_metrics()
: 100X speedup for polars rolling kurtosis
Full Changelog: v1.2.0...v1.2.2
pytimetk 1.2.1
Improvements:
augment_rolling_risk_metrics()
: Gains a newmetrics
argument allowing users to speed up calculations by only requesting the rolling risk metrics they need. DefaultNone
is all metrics.
Full Changelog: v1.2.0...v1.2.1
pytimetk 1.2.0
New Functions
augment_drawdown()
: The augment_drawdown function calculates the drawdown metrics for a financial time series using either pandas or polars engine, and returns the augmented DataFrame with peak value, drawdown, and drawdown percentage columns.augment_rolling_risk_metrics()
: The augment_rolling_risk_metrics function calculates rolling risk-adjusted performance metrics for a financial time series using either pandas or polars engine, and returns the augmented DataFrame with columns for Sharpe Ratio, Sortino Ratio, and other metrics.augment_fip_momentum()
: Calculate the "Frog In The Pan" (FIP) momentum metric over one or more rolling windows using either pandas or polars engine, augmenting the DataFrame with FIP columns.augment_stochastic_oscillator
: Theaugment_stochastic_oscillator()
function calculates the Stochastic Oscillator (%K and %D) for a financial instrument using either pandas or polars engine, and returns the augmented DataFrame.augment_adx()
: Calculate Average Directional Index (ADX), +DI, and -DI for a financial time series to determine strength of trend.augment_hurst_exponent()
: Calculate the Hurst Exponent on a rolling window for a financial time series.augment_ewma_volatility()
: Calculate Exponentially Weighted Moving Average (EWMA) volatility for a financial time series.augment_regime_detection()
: Detect regimes in a financial time series using a specified method (e.g., HMM).
Bug Fixes and Speed Improvements
summarize_by_time()
: polars engine rebuild. Columns should match pandas engine.__init__.py
: updated to fix circular importsget_date_summary()
: Fixed issues with polar tzaugment_hilbert()
: Improve polars engine and fix error with groupby()augment_ewm()
: fix examplefrom pytimetk import augment_ewm
test_plot_timeseries
: Fix broken test
Full Changelog: v1.1.2...v1.2.0
pytimetk 1.1.2
pytimetk 1.1.1
Bug Fixes
augment_ppo()
: fixed issues with leftover multi-index when using grouped df and pandas engineaugment_qsmomentum()
: Fixed issue with divide by zero when standard deviation is zero
Full Changelog: v1.1.0...v1.1.1
pytimetk 1.1.0
Highlights
- TimeSeriesCV and TimeSeriesCVSplitter: https://business-science.github.io/pytimetk/reference/#time-series-cross-validation-tscv
- New Tutorial - Time Series Cross Validation: https://business-science.github.io/pytimetk/tutorials/07_timeseries_crossvalidation.html
New Features
Time Series Cross Validation (TSCV)
Integration with timebasedcv
#291. New Classes:
TimeSeriesCV()
: An enhanced version ofTimeBasedSplit()
that defaults tomode = "backwards"
, allows for maximum splits usingsplit_limit
, and adds enhanced diagnostics likeglimpse()
andplot()
Plotly Dropdowns
A plotly dropdown automates the group-wise analysis. Instead of facets, which are only powerful for <=9 plots at a time, a dropdown can easily visualize more plots.
plot_timeseries()
: Gets new parametersplotly_dropdown
,plotly_dropdown_x
,plotly_dropdown_y
#301plot_anomalies()
: Gets new parametersplotly_dropdown
,plotly_dropdown_x
,plotly_dropdown_y
#301
Wide-Format Plotting
- plot_timeseries(value_column = list(), color_column=list()): Now supports multiple columns in wide format for grouped time series data visualization. #136
Full Changelog: v1.0.0...v1.1.0
pytimetk 1.0.0
Pandas and Polars Compatibility:
Upgrading to:
- pandas >= 2.0.0
- polars >= 1.2.0
Use pytimetk <=0.4.0 to support:
- pandas <2.0.0
- polars <1.0.0
Improvements:
Pytimetk 0.4.0
pytimetk 0.4.0
Feature Engineering Module:
augment_pct_change()
: pandas and polars engines
Finance Module Updates:
augment_macd()
: MACD, pandas and polars enginesaugment_bbands()
: Bollinger Bands, pandas and polars enginesaugment_atr()
: Average True Range, pandas and polars enginesaugment_ppo()
: Percentage Price Oscillator, pandas and polars enginesaugment_rsi()
: Relative Strength Index, pandas and polars enginesaugment_qsmomentum()
: Quant Science Momentum Indicator, pandas and polars enginesaugment_roc()
: Rate of Change (ROC), pandas and polars e ngines
Polars Upgrades
- Migrate to
polars 0.20.7
Pytimetk 0.3.0
pytimetk 0.3.0
Correlation Funnel
The R package correlationfunnel
has been ported inside pytimetk
:
binarize()
correlate()
plot_correlation_funnel()
Core:
filter_by_time()
- Filtering with time-based strings
Feature Engineering:
augment_diffs()
- Can now add differenced columnsaugment_fourier()
- Can now add fourier features.
Finance Module:
augment_cmo()
: Chande Momentum Oscillator (CMO)
New Polars Backends:
augment_diffs()
augment_fourier()
augment_cmo()
General
- Make memory reduction optional #275
pytimetk 0.2.1
Fixes #216 - Incorrect sort order of polars engine. Affected: augment_rolling()
, agument_expanding()