ngriffiths13 / polars-trading

A collection of helpful polars plugins and functions for market data processing.
29 stars 3 forks source link

feat(labels): implement vertical barrier label #9

Closed ngriffiths13 closed 1 month ago

ngriffiths13 commented 1 month ago

This PR implements a function that calculates a vertical barrier label using a timedelta strategy.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 94.00%. Comparing base (89199a9) to head (d0f8afb). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
polars_trading/labels/dynamic_labels.py 75.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9 +/- ## ========================================== - Coverage 96.92% 94.00% -2.93% ========================================== Files 6 6 Lines 130 150 +20 ========================================== + Hits 126 141 +15 - Misses 4 9 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #9 will not alter performance

Comparing feat/vertical-barrier (d0f8afb) with main (89199a9)

Summary

✅ 10 untouched benchmarks

🆕 1 new benchmarks

Benchmarks breakdown

Benchmark main feat/vertical-barrier Change
🆕 test__get_vertical_barrier_by_timedelta__benchmark[trade_data0] N/A 37.3 ms N/A