Skip to content

Commit

Permalink
feat: Latest backtest
Browse files Browse the repository at this point in the history
  • Loading branch information
namuan committed Dec 19, 2024
1 parent 44e10f2 commit a24eb3f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Options_Analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cp data/spx_eod.db data/spx_eod_vol_filter.db
```shell
for dte in {7..60}; do
echo "Running for DTE: $dte"
./options-straddle-profit-take-stop-loss-adjustment.py --db-path data/spx_eod.db --dte $dte --profit-take 30 --stop-loss 100 --max-open-trades 5 -v
./options-straddle-profit-take-stop-loss-adjustment.py --db-path data/spx_eod.db --dte $dte --profit-take 10 --stop-loss 75 --max-open-trades 5 -v
done
```

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Collection of scripts and utilities for stock market analysis, strategies etc
* [short-straddle-1-max-position-close-at-expiry](https://namuan.github.io/trading-utils/short-straddles/short-straddle-1-max-position-close-at-expiry.html)
* [short-straddle-5-max-position-30-profit-100-loss-close-at-expiry](https://namuan.github.io/trading-utils/short-straddles/short-straddle-5-max-position-30-profit-100-loss-close-at-expiry.html)
* [short-straddle-low-vol-5-max-pos-30-pt-100-sl-close-at-expiry](https://namuan.github.io/trading-utils/short-straddles/short-straddle-low-vol-5-max-pos-30-pt-100-sl-close-at-expiry.html)
* [short-straddle-5-max-pt-10-sl-75-with-adjustment](https://namuan.github.io/trading-utils/short-straddles/short-straddle-5-max-pt-10-sl-75-with-adjustment.html)

## Setup virtual environment

Expand Down

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion options-straddle-profit-take-stop-loss-adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def update_open_trades(db, quote_date, profit_take, stop_loss):
trade_can_be_closed, closing_reason = can_close_trade_for_adjustment(
call_price, put_price
)
# pass

if quote_date >= trade["ExpireDate"] or trade_can_be_closed:
db.update_trade_status(
Expand Down

0 comments on commit a24eb3f

Please sign in to comment.