fix trading/portfolio/wavelets/predictor bugs; refactor markov chains to modular pipeline
Dmitry Beresnev
5784bb6
Markov chains (refactor):
- split 600-line HMMLearnTrader god class into one-class-per-module pipeline:
types, data_loader, features, hmm_trainer, state_interpreter,
signal_generator, metrics, report_writer, plotter, backtester (facade + DI)
- behavior preserved exactly (synthetic checks reproduce identical numbers)
Trading module:
- broker_connector: stop-loss was submitted as a LIMIT order at the stop
price — instantly marketable, would close positions on entry; replaced
with Alpaca native bracket order (atomic, OCO legs). Fixed alpaca-py API
mismatches: avg_entry_price, cancel_order_by_id, GetOrdersRequest
- backtest_engine: exit PnL used a size recomputed at exit time instead of
the entry size; equity curve marked-to-market a fake 100%-capital
position; state leaked across run() calls; blocked-signal counters
inflated on signal-less bars
- risk_engine: correlated portfolio heat used sqrt(dollar risk) as
volatility (unit-dependent); now sqrt(r^T R r) on dollar ris…
fix HF exit 139: pin tensorflow/torch/keras/transformers versions, set KERAS_BACKEND before keras import
Dmitry Beresnev
d919e19
fix fundamental analysis module
Dmitry Beresnev
0114ac0
refactor AsyncTradingGridGenerator and cmd
Dmitry Beresnev
b29cc85
refactor AsyncTradingGridGenerator
Dmitry Beresnev
37cf50e
add async trading grid calculator
Dmitry Beresnev
71b426d
fix prediction report
Dmitry Beresnev
b86b0bb
fix predict method
Dmitry Beresnev
9e5cc20
fix predict method
Dmitry Beresnev
cd47362
fix indicators calculation
Dmitry Beresnev
1285ce0
fix indicators calculation
Dmitry Beresnev
90c9e6b
fix indicators calculation
Dmitry Beresnev
138af32
fix indicators calculation
Dmitry Beresnev
aef3905
fix indicators calculation
Dmitry Beresnev
9166a4d
fix indicators calculation
Dmitry Beresnev
69b613d
fix indicators calculation
Dmitry Beresnev
ce207d4
add stock predictor, fix news iterator, etc
Dmitry Beresnev
e319c0a
fix models loading
Dmitry Beresnev
207f27a
fix the company news iterator, add libs, add async stock predictor
Dmitry Beresnev
e1908d2
fix the company news iterator
Dmitry Beresnev
0164936
add log to the company news iterator
Dmitry Beresnev
c703d23
fix the company news iterator to process any ticker, fix ticker in the prompt
Dmitry Beresnev
33336cd
fix the company news iterator to process any ticker
Dmitry Beresnev
e068d36
fix the company news iterator
Dmitry Beresnev
d304105
fix the company news iterator
Dmitry Beresnev
1bae797
fix the company news iterator
Dmitry Beresnev
e5ee78e
fix the company news iterator
Dmitry Beresnev
1cf84f7
fix the company news iterator
Dmitry Beresnev
09ba93c
fix the company news iterator
Dmitry Beresnev
1d04bde
add a company news iterator
Dmitry Beresnev
795dd15
add a new openrouter api key, limit the total count of articles