Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b60a8a4
Bump version to 0.2.4
joaquinbejar Dec 7, 2024
367102b
Add git log rule to Makefile with branch detection.
joaquinbejar Dec 7, 2024
3a69144
Refactor strategy function to use StrategyLegs
joaquinbejar Dec 7, 2024
afac7ad
Refactor strategy creation to use StrategyLegs enum.
joaquinbejar Dec 7, 2024
d9ec20d
Merge pull request #51 from joaquinbejar/feature/#48-Implement-Strate…
joaquinbejar Dec 7, 2024
ca0afe8
Refactor strategy creation in poor man's covered call
joaquinbejar Dec 7, 2024
cb39f2a
Clean up whitespace in poor_mans_covered_call.rs
joaquinbejar Dec 7, 2024
4c679e4
Add optimization capability to IronCondor strategy
joaquinbejar Dec 7, 2024
e4e37cd
Refactor are_valid_prices to use StrategyLegs
joaquinbejar Dec 7, 2024
bdfaaf5
Merge pull request #52 from joaquinbejar/fix/#48-Strategy-legs
joaquinbejar Dec 7, 2024
90d31f5
Merge branch 'release/v0.2.4' into feature/#23-Implement-Iron-Condor-…
joaquinbejar Dec 7, 2024
9c13f67
Remove Spanish comments from bear_put_spread tests
joaquinbejar Dec 8, 2024
68e4877
Add validation and optimization to Iron Condor strategy
joaquinbejar Dec 8, 2024
16d25d3
Merge pull request #53 from joaquinbejar/feature/#23-Implement-Iron-C…
joaquinbejar Dec 8, 2024
b92ef24
Add Iron Butterfly strategy implementation
joaquinbejar Dec 8, 2024
2b01762
Merge pull request #55 from joaquinbejar/feature/#54-Implement-Iron-B…
joaquinbejar Dec 8, 2024
598cdef
Add strategies classifications to README
joaquinbejar Dec 8, 2024
651fe1a
Update mermaid code from graph to flowchart
joaquinbejar Dec 8, 2024
29c4856
Update terminology in README.md for stock references
joaquinbejar Dec 8, 2024
427f6bb
Refactor mermaid flowchart for readability
joaquinbejar Dec 8, 2024
54cb26d
Refactor label offset logic in chart visualization
joaquinbejar Dec 8, 2024
7e71380
Merge pull request #56 from joaquinbejar/feature/#47-Adapt-label_offs…
joaquinbejar Dec 8, 2024
943e8b5
Add detailed documentation for `ChartPoint` and `ChartVerticalLine`
joaquinbejar Dec 8, 2024
42b3a47
Add comprehensive documentation for model module
joaquinbejar Dec 10, 2024
565f756
Merge pull request #57 from joaquinbejar/feature/#50-Implement-cargo-…
joaquinbejar Dec 10, 2024
11a253b
Add LongButterfly and ShortButterfly strategies
joaquinbejar Dec 10, 2024
684f02e
Implement Long and Short Butterfly Spread Strategies
joaquinbejar Dec 10, 2024
01741ef
Rename strategies and adjust logging levels
joaquinbejar Dec 10, 2024
1c3fe23
Refactor leg handling in strategy patterns
joaquinbejar Dec 10, 2024
831e651
Refactor butterfly spread strategies and add optimization.
joaquinbejar Dec 10, 2024
6d46db5
Merge pull request #58 from joaquinbejar/feature/#18-Implement-Butter…
joaquinbejar Dec 10, 2024
e1c4cd9
Enhance strategy handling with `Positionable` trait integration
joaquinbejar Dec 11, 2024
ec565b2
Add Positionable trait implementation to strategy structs
joaquinbejar Dec 11, 2024
f6cf3b9
Add tests for Greek calculations with position size
joaquinbejar Dec 11, 2024
e0db980
Refactor greeks to account for option quantity in outputs
joaquinbejar Dec 11, 2024
8878940
Refactor strategy traits to include Positionable implementation
joaquinbejar Dec 11, 2024
b55ee01
Refactor strategies to use `Positionable` trait for positions
joaquinbejar Dec 11, 2024
d4b4ede
Add Delta Neutral strategies module with core functionality
joaquinbejar Dec 11, 2024
f31304a
Update dependencies for chrono and serde
joaquinbejar Dec 12, 2024
66ff5ab
Add support for grouped options and delta calculations
joaquinbejar Dec 12, 2024
7570757
Add `filter_options_in_strike` method with tests
joaquinbejar Dec 12, 2024
91ea663
Add `OptionChainParams` trait with `get_params` method
joaquinbejar Dec 12, 2024
46dc3a3
Add examples_strategies_delta to workspace members
joaquinbejar Dec 12, 2024
9a1f705
Add short strangle strategy example
joaquinbejar Dec 12, 2024
a7f2c72
Enable public access to delta_neutral module.
joaquinbejar Dec 12, 2024
db57301
Add delta neutrality logic and tests for short strangles
joaquinbejar Dec 12, 2024
7898148
Refactor formatting and indentation across strategy modules.
joaquinbejar Dec 12, 2024
2c7c788
Add support for delta neutrality in long strangle strategy
joaquinbejar Dec 12, 2024
084b0fc
`Add delta neutrality and greeks implementation for straddles`
joaquinbejar Dec 12, 2024
37ba162
Add delta-neutral support to Poor Man's Covered Call
joaquinbejar Dec 12, 2024
5eea6a6
Fix incorrect delta adjustment calculation.
joaquinbejar Dec 12, 2024
350f7b4
Add delta neutrality support to IronCondor strategy
joaquinbejar Dec 12, 2024
245047e
Add delta-neutral adjustments for IronButterfly strategy
joaquinbejar Dec 12, 2024
3143235
Remove debug println from delta adjustments method
joaquinbejar Dec 12, 2024
079942a
Add delta-neutral functionality to CallButterfly strategy
joaquinbejar Dec 12, 2024
8d8cec5
Rename test helper and functions for consistency.
joaquinbejar Dec 12, 2024
f77af80
Add delta-neutrality and Greeks for butterfly spreads
joaquinbejar Dec 12, 2024
63a7381
Add delta-neutrality support and examples for spread strategies
joaquinbejar Dec 12, 2024
e732775
Refactor volatility utils module import structure
joaquinbejar Dec 12, 2024
0472041
Merge pull request #60 from joaquinbejar/feature/#37-Implement-Delta-…
joaquinbejar Dec 12, 2024
ebe017d
Add 'check-spanish' target to Makefile
joaquinbejar Dec 13, 2024
1c95b90
Add flexible combinatorial iterators to OptionChain
joaquinbejar Dec 13, 2024
b136540
Refactor bull put spread optimization logic.
joaquinbejar Dec 13, 2024
2c6bb43
Refactor `filter_combinations` with detailed documentation.
joaquinbejar Dec 13, 2024
9ac0e00
Merge pull request #63 from joaquinbejar/feature/#61-Implement-Iterat…
joaquinbejar Dec 13, 2024
6c1cbee
Update publish target to include readme and coverage
joaquinbejar Dec 13, 2024
56463f3
Fix spacing inconsistencies in bull_put_spread.rs documentation
joaquinbejar Dec 13, 2024
a674d98
Add Greek calculations and tests for CustomStrategy
joaquinbejar Dec 13, 2024
7b0e5cd
Merge pull request #64 from joaquinbejar/feature/#59-Implement-the-Gr…
joaquinbejar Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "optionstratlib"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
authors = ["Joaquin Bejar <[email protected]>"]
description = "OptionStratLib is a comprehensive Rust library for options trading and strategy development across multiple asset classes."
Expand All @@ -27,7 +27,7 @@ include = [
]

[dependencies]
chrono = "0.4.38"
chrono = ">=0.4.39"
approx = "0.5.1"
plotters = "0.3.7"
statrs = "0.18.0"
Expand All @@ -37,7 +37,7 @@ tracing-subscriber = "0.3.19"
num-traits = "0.2.19"
serde_json = "1.0.133"
csv = "1.3.1"
serde = { version = "1.0.215", features = ["derive"] }
serde = { version = "1.0.216", features = ["derive"] }
rayon = "1.10.0"
itertools = "0.13.0"

Expand All @@ -53,6 +53,7 @@ path = "src/lib.rs"
members = [
"examples/examples_simulation",
"examples/examples_strategies_best",
"examples/examples_strategies_delta",
"examples/examples_strategies",
"examples/examples_visualization",
"examples/examples_chain",
Expand Down
Binary file modified Draws/Options/intrinsic_value_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Draws/Strategy/bull_put_spread_profit_loss_chart_best_area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Draws/Strategy/iron_condor_profit_loss_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Draws/Strategy/poor_mans_covered_call_profit_loss_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Makefile for common tasks in a Rust project
# Detect current branch
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)

# Default target
.PHONY: all
Expand Down Expand Up @@ -56,14 +58,14 @@ fix:
cargo fix --allow-staged --allow-dirty

.PHONY: pre-push
pre-push: fix fmt lint-fix test
pre-push: fix fmt lint-fix test readme

.PHONY: doc
doc:
cargo doc --open

.PHONY: publish
publish:
publish: readme coverage
cargo login ${CARGO_REGISTRY_TOKEN}
cargo package
cargo publish
Expand All @@ -78,4 +80,26 @@ coverage:
coverage-html:
cargo install cargo-tarpaulin
mkdir -p coverage
cargo tarpaulin --all-features --workspace --timeout 120 --out Html
cargo tarpaulin --all-features --workspace --timeout 120 --out Html


# Rule to show git log
git-log:
@if [ "$(CURRENT_BRANCH)" = "HEAD" ]; then \
echo "You are in a detached HEAD state. Please check out a branch."; \
exit 1; \
fi; \
echo "Showing git log for branch $(CURRENT_BRANCH) against main:"; \
git log main..$(CURRENT_BRANCH) --pretty=full

.PHONY: create-doc
create-doc:
cargo doc --no-deps --document-private-items

.PHONY: readme
readme: create-doc
cargo readme > README.md

.PHONY: check-spanish
check-spanish:
cd scripts && python3 spanish.py ../src && cd ..
Loading
Loading