Skip to content

Commit bcffa40

Browse files
authored
Merge pull request #3 from wdm0006/negative-bets
no longer allowing negative bets
2 parents 117aa4a + 76c5c93 commit bcffa40

26 files changed

+1843
-1184
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
v0.2.0
2+
======
3+
4+
* no longer allowing negative bets
5+
6+
v0.1.0
7+
======
8+
9+
* modernizing, added new methods, examples fixes
10+
111
v0.0.2
212
======
313

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help setup install install-dev test test-cov lint format clean build docs lint-fix test-all
1+
.PHONY: help setup install install-dev test test-cov lint format clean build docs lint-fix test-all examples
22

33
# Default target
44
help:
@@ -15,6 +15,7 @@ help:
1515
@echo " make clean - Clean build artifacts"
1616
@echo " make build - Build package distributions"
1717
@echo " make docs - Build documentation"
18+
@echo " make examples - Run example scripts"
1819

1920
# Setup development environment
2021
setup:
@@ -88,4 +89,8 @@ docs:
8889
test-all:
8990
uv run tox
9091

92+
# Run example scripts
93+
examples:
94+
uv run python examples/st_petersburg_comparison.py
95+
9196
all: clean test docs

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Keeks implements several betting strategies:
114114

115115
4. **OptimalF (Ralph Vince)**: Strategy that maximizes geometric growth rate
116116
```python
117+
from keeks.binary_strategies.simple import OptimalF
117118
optimal_f = OptimalF(payoff=1.0, loss=1.0, transaction_cost=0.01, win_rate=0.55, max_risk_fraction=0.2)
118119
```
119120

docs/source/binary_strategies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Drawdown-Adjusted Kelly
7171
OptimalF
7272
--------
7373

74-
.. autoclass:: keeks.binary_strategies.kelly.OptimalF
74+
.. autoclass:: keeks.binary_strategies.simple.OptimalF
7575
:members:
7676
:undoc-members:
7777
:show-inheritance:

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
import sys
2424

2525
# Add the project root directory to the Python path
26-
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
26+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))
2727

2828
# Now import the version
29-
from version import __version__ # noqa
29+
from version import __version__ # noqa
3030

3131
# -- Project information -----------------------------------------------------
3232

@@ -54,7 +54,7 @@
5454
]
5555

5656
# Configure Google Analytics
57-
googleanalytics_id = 'G-Z43R9PWW0B'
57+
googleanalytics_id = "G-Z43R9PWW0B"
5858
googleanalytics_enabled = True
5959

6060
# Configure autodoc

docs/source/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Keeks provides several betting strategies:
7474

7575
.. code-block:: python
7676
77-
from keeks.binary_strategies import OptimalF
77+
from keeks.binary_strategies.simple import OptimalF
7878
strategy = OptimalF(payoff=1.0, loss=1.0, transaction_cost=0.01, win_rate=0.55)
7979
8080
5. **Fixed Fraction**: Simple strategy that bets a constant percentage
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Strategy,Mean,Median,Min,Max,Std Dev,Ruin Rate
2-
Optimal F,$8850.21,$4531.10,$427.05,$62215.48,$13304.41,0.0%
3-
Kelly Criterion,$6556.40,$3908.14,$186.24,$35769.35,$8295.71,0.0%
4-
Dynamic,$4212.01,$3347.64,$219.24,$11781.99,$3141.50,0.0%
5-
Fixed 10%,$4003.31,$2714.32,$270.36,$22102.81,$4337.05,0.0%
6-
Fixed 5%,$2731.31,$2214.65,$596.65,$5986.96,$1558.35,0.0%
7-
Drawdown Kelly,$2433.14,$2054.62,$801.76,$7314.01,$1527.23,0.0%
8-
Half Kelly,$2343.33,$2346.28,$477.95,$5746.13,$1277.11,0.0%
9-
Quarter Kelly,$1564.20,$1467.76,$842.46,$2922.46,$482.53,0.0%
10-
CPPI,$639.09,$900.02,$0.00,$1129.97,$420.39,30.0%
11-
Naive Strategy,$0.00,$0.00,$0.00,$0.00,$0.00,100.0%
2+
Kelly Criterion,$10900.82,$6022.00,$734.13,$64062.08,$14408.29,0.0%
3+
Optimal F,$8506.61,$2966.63,$317.64,$84703.55,$17251.51,0.0%
4+
Naive Strategy,$7655.71,$4531.13,$46.75,$47174.48,$10339.11,0.0%
5+
Fixed 10%,$4528.56,$3347.65,$411.20,$22102.97,$4960.43,0.0%
6+
Half Kelly,$2476.93,$1661.09,$719.60,$7700.17,$1762.01,0.0%
7+
Dynamic,$2252.37,$1322.78,$506.39,$6992.05,$1836.69,0.0%
8+
Fixed 5%,$2000.48,$1889.84,$662.56,$6648.62,$1173.42,0.0%
9+
Drawdown Kelly,$1949.81,$1744.40,$571.80,$4258.18,$970.31,0.0%
10+
Quarter Kelly,$1714.12,$1688.38,$784.04,$2750.99,$561.85,0.0%
11+
CPPI,$1094.47,$1106.57,$962.08,$1236.48,$77.97,0.0%
Loading

0 commit comments

Comments
 (0)