trigerr 0.7.4__tar.gz → 0.7.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trigerr-0.7.4/trigerr.egg-info → trigerr-0.7.5}/PKG-INFO +1 -1
- trigerr-0.7.5/tests/test_capital_used.py +94 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/__init__.py +1 -1
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/orders/orders_utils.py +10 -1
- {trigerr-0.7.4 → trigerr-0.7.5/trigerr.egg-info}/PKG-INFO +1 -1
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr.egg-info/SOURCES.txt +1 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/LICENSE +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/README.md +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/pyproject.toml +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/setup.cfg +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_brokerage.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_bt_orders.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_crypto_utils.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_data_market.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_exit_mutex.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_historical_client_config.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_ledger_contract.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_live_orders_correlation.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_logging_utils.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_orders_schema.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_package.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_reference_symbol_details.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_schema_parity.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/tests/test_symbols.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/config.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/crypto_utils.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/custom_indicators.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/data/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/data/historical.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/data/market.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/data/reference.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/bt_state.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/candle_transforms.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/catalog.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/clock.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/compiler.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/data_feeds.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/execution_core.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/exit_engine.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/expressions.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/instrument.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/point_in_time.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/position_sizing.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/framework/tick_sources.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/jobs.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/orders/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/orders/backtest.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/orders/live.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/orders/virtual.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/symbols.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/__main__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/_typing.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/cdl_doji.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/cdl_inside.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/cdl_pattern.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/cdl_z.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/candle/ha.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/core.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/custom.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/cycle/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/cycle/ebsw.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/cycle/reflex.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/ma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/maps.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/ao.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/apo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/bias.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/bop.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/brar.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/cci.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/cfo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/cg.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/cmo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/coppock.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/crsi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/cti.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/dm.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/er.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/eri.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/exhc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/fisher.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/inertia.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/kdj.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/kst.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/macd.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/mom.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/pgo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/ppo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/psl.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/qqe.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/roc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/rsi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/rsx.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/rvgi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/slope.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/smc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/smi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/squeeze.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/squeeze_pro.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/stc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/stoch.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/stochf.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/stochrsi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/tmo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/trix.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/tsi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/uo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/momentum/willr.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/alligator.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/alma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/dema.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/ema.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/fwma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/hilo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/hl2.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/hlc3.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/hma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/hwma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/ichimoku.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/jma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/kama.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/linreg.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/mama.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/mcgd.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/midpoint.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/midprice.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/ohlc4.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/pivots.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/pwma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/rma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/sinwma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/sma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/smma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/ssf.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/ssf3.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/supertrend.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/swma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/t3.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/tema.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/trima.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/vidya.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/wcp.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/wma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/overlap/zlma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/performance/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/performance/drawdown.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/performance/log_return.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/performance/percent_return.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/py.typed +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/entropy.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/kurtosis.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/mad.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/median.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/quantile.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/skew.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/stdev.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/tos_stdevall.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/variance.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/statistics/zscore.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/adx.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/alphatrend.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/amat.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/aroon.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/chop.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/cksp.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/decay.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/decreasing.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/dpo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/ht_trendline.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/increasing.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/long_run.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/psar.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/qstick.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/rwi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/short_run.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/trendflex.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/ttm_trend.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/vhf.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/vortex.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/trend/zigzag.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_candles.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_core.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_math.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_numba.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_signals.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_study.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_time.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/utils/_validate.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/aberration.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/accbands.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/atr.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/atrts.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/bbands.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/chandelier_exit.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/donchian.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/hwc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/kc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/massi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/natr.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/pdist.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/rvi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/thermo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/true_range.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volatility/ui.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/__init__.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/ad.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/adosc.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/aobv.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/cmf.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/efi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/eom.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/kvo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/mfi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/nvi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/obv.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/pvi.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/pvo.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/pvol.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/pvr.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/pvt.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/tsv.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/vhm.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/vp.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/vwap.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/ta/volume/vwma.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr/utils.py +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr.egg-info/dependency_links.txt +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr.egg-info/requires.txt +0 -0
- {trigerr-0.7.4 → trigerr-0.7.5}/trigerr.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Every trade carries two amounts: `investment`, the capital set aside for it, and `capital_used`, what its entry really
|
|
3
|
+
put to work. `quantity` counts units for spot and futures and lots for everything else (the rule the P&L is priced
|
|
4
|
+
with), and an order carries the `leverage` it was sized with, so the used amount is the position value over it.
|
|
5
|
+
|
|
6
|
+
Offline: no Mongo, no Redis, no network.
|
|
7
|
+
"""
|
|
8
|
+
import datetime
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
12
|
+
from trigerr.orders import orders_utils
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def entry_order(**extra):
|
|
16
|
+
order = {
|
|
17
|
+
"symbol": "NIFTY_22600_PE", "data_key": "UPSTOX:XNSE:NIFTY_22600_PE", "group_id": "r1:1",
|
|
18
|
+
"trade_action": "ENTRY", "date": datetime.datetime(2026, 10, 22), "day": "Thursday",
|
|
19
|
+
"order_timestamp": "2026-10-22 13:38:00", "trigger_price": 136.9, "quantity": 11,
|
|
20
|
+
"lot_size": 65, "investment": 100000, "position_type": "LONG", "exchange": "NFO",
|
|
21
|
+
"market": "IN", "order_type": "MARKET", "quantity_left": 0,
|
|
22
|
+
"user_id": "507f1f77bcf86cd799439011", "strategy_id": "507f1f77bcf86cd799439012",
|
|
23
|
+
"request_id": "507f1f77bcf86cd799439013",
|
|
24
|
+
}
|
|
25
|
+
order.update(extra)
|
|
26
|
+
return order
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def exit_order(**extra):
|
|
30
|
+
order = {
|
|
31
|
+
"symbol": "NIFTY_22600_PE", "trade_action": "EXIT", "exit_type": "T1", "quantity_left": 0,
|
|
32
|
+
"order_timestamp": "2026-10-22 13:50:00", "trigger_price": 150.0, "quantity": 11,
|
|
33
|
+
"position_type": "LONG", "order_type": "MARKET",
|
|
34
|
+
}
|
|
35
|
+
order.update(extra)
|
|
36
|
+
return order
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def converted(market_type="options", entry=None, exit=None):
|
|
40
|
+
trades = orders_utils.convert_to_trades(
|
|
41
|
+
orders_list=[entry_order(**(entry or {})), exit_order(**(exit or {}))],
|
|
42
|
+
market_type=market_type, order_exit_levels=["T1"], mode="vt", broker="zerodha")
|
|
43
|
+
assert trades is not None and len(trades) == 1
|
|
44
|
+
return trades[0]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def test_options_count_lots_times_lot_size():
|
|
48
|
+
trade = converted()
|
|
49
|
+
assert trade["capital_used"] == round(136.9 * 11 * 65, 2) == 97883.5
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_the_capital_set_aside_is_kept_and_is_a_little_more_than_was_used():
|
|
53
|
+
trade = converted()
|
|
54
|
+
assert trade["investment"] == 100000
|
|
55
|
+
assert trade["capital_used"] < trade["investment"]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_futures_and_spot_count_units_not_lots():
|
|
59
|
+
futures = converted(market_type="futures", entry={"quantity": 3, "lot_size": 50, "trigger_price": 100}, exit={"quantity": 3})
|
|
60
|
+
assert futures["capital_used"] == 300
|
|
61
|
+
spot = converted(market_type="spot", entry={"quantity": 10, "lot_size": 1, "trigger_price": 250}, exit={"quantity": 10})
|
|
62
|
+
assert spot["capital_used"] == 2500
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_leverage_divides_the_position_value():
|
|
66
|
+
trade = converted(entry={"quantity": 10, "lot_size": 25, "trigger_price": 100, "leverage": 5}, exit={"quantity": 10})
|
|
67
|
+
assert trade["capital_used"] == 5000
|
|
68
|
+
futures = converted(market_type="futures", entry={"quantity": 3, "trigger_price": 100, "leverage": 10}, exit={"quantity": 3})
|
|
69
|
+
assert futures["capital_used"] == 30
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@pytest.mark.parametrize("leverage", [None, 0, 1])
|
|
73
|
+
def test_no_leverage_counts_as_one(leverage):
|
|
74
|
+
extra = {} if leverage is None else {"leverage": leverage}
|
|
75
|
+
assert converted(entry=extra)["capital_used"] == 97883.5
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def test_a_fractional_crypto_position_keeps_its_cents():
|
|
79
|
+
order = entry_order(market="CRYPTO", quantity=0.5, trigger_price=60000.25, lot_size=1, leverage=10)
|
|
80
|
+
assert orders_utils.capital_used(order, "futures") == 3000.01
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def test_every_trade_of_a_run_carries_it():
|
|
84
|
+
orders = [entry_order(group_id="r1:1"), exit_order(), entry_order(group_id="r1:2", trigger_price=140.0), exit_order(trigger_price=120.0)]
|
|
85
|
+
trades = orders_utils.convert_to_trades(orders_list=orders, market_type="options", order_exit_levels=["T1"], mode="vt", broker="zerodha")
|
|
86
|
+
assert [trade["capital_used"] for trade in trades] == [97883.5, round(140.0 * 11 * 65, 2)]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def test_leverage_changes_what_was_used_not_the_profit_or_the_charges():
|
|
90
|
+
plain = converted()
|
|
91
|
+
leveraged = converted(entry={"leverage": 5})
|
|
92
|
+
assert leveraged["capital_used"] == plain["capital_used"] / 5
|
|
93
|
+
for field in ("pnl", "net_pnl", "brokerage", "pnl_percent"):
|
|
94
|
+
assert leveraged[field] == plain[field]
|
|
@@ -140,6 +140,14 @@ def check_open_orders(orders_list):
|
|
|
140
140
|
return {}
|
|
141
141
|
|
|
142
142
|
|
|
143
|
+
def capital_used(order, market_type):
|
|
144
|
+
""" What an entry order really put to work: its position value over its leverage. `quantity` counts units for spot and
|
|
145
|
+
futures and lots for everything else, the same rule convert_to_trades prices the P&L with. The order carries the
|
|
146
|
+
`leverage` it was sized with (1 when it carries none); a market with another way of tying up money passes its own. """
|
|
147
|
+
units = order["quantity"] if market_type in ("spot", "futures") else order["quantity"] * order["lot_size"]
|
|
148
|
+
return round(order["trigger_price"] * units / (order.get("leverage") or 1), 2)
|
|
149
|
+
|
|
150
|
+
|
|
143
151
|
def convert_to_trades(orders_list, market_type, order_exit_levels, mode, broker, holding_type="intraday"):
|
|
144
152
|
"""Function to convert Orders to Trades """
|
|
145
153
|
try:
|
|
@@ -163,7 +171,8 @@ def convert_to_trades(orders_list, market_type, order_exit_levels, mode, broker,
|
|
|
163
171
|
trade_dict["entry_time"] = order["order_timestamp"]
|
|
164
172
|
trade_dict["entry_price"] = order["trigger_price"]
|
|
165
173
|
trade_dict["quantity"] = order["quantity"]
|
|
166
|
-
trade_dict["investment"] = order["investment"]
|
|
174
|
+
trade_dict["investment"] = order["investment"] # the capital set aside for the trade
|
|
175
|
+
trade_dict["capital_used"] = capital_used(order, market_type) # what it really put to work
|
|
167
176
|
trade_dict["day"] = order.get("day", "")
|
|
168
177
|
trade_dict["expiry"] = order.get("expiry", "")
|
|
169
178
|
trade_dict["pnl"] = 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|