Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/add-kelly-strategy #119

Merged
merged 84 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
b72df42
WIP: Add logging messages
jhehemann Oct 4, 2023
e4dcd8d
chore: Update packages
jhehemann Oct 4, 2023
dc6d71c
chore: Update packages
jhehemann Oct 4, 2023
1a9acf2
feat: Add mech_price to potential_net_profit calculation
jhehemann Oct 4, 2023
e820137
refactor: Make trading strategy an environment variable
jhehemann Oct 5, 2023
54d93e2
WIP: Add odds and win probability as variables
jhehemann Oct 7, 2023
1ee8977
feat: Add kelly bet amount calculation
jhehemann Oct 10, 2023
6bb29a9
chore: update packages
jhehemann Oct 10, 2023
8ef44c6
chore: Update hashes and packages
jhehemann Oct 10, 2023
4c77480
feat: Add kelly bet amount calculation function
jhehemann Oct 11, 2023
198cdc5
Merge branch 'main' of https://github.com/valory-xyz/trader into kell…
jhehemann Oct 14, 2023
93b03cb
chore: update packages
jhehemann Oct 17, 2023
88b3a65
chore: Update packages
jhehemann Oct 17, 2023
133a6d6
refactor: Reset mech tools
jhehemann Oct 18, 2023
5867590
refactor: Outsourced Kelly calc
jhehemann Oct 18, 2023
935242d
chore: Update packages
jhehemann Oct 18, 2023
5e0d810
fix: Manually resolve dependencies
jhehemann Oct 19, 2023
4ad2b14
fix: Add dev dependencies
jhehemann Oct 19, 2023
81c58fa
fix: Remove dev dependencies
jhehemann Oct 19, 2023
c7ad754
WIP: Implement betting strategy 'kelly criterion'
jhehemann Oct 19, 2023
f804ac9
fix: Resolved dependency mismatches
jhehemann Oct 19, 2023
a1510ee
fix: Resolved package incompatibilities manually
jhehemann Oct 19, 2023
603c50e
fix: Resolved package incompatibilities manually
jhehemann Oct 19, 2023
38a0f77
fix: Resolved package incompatibilities manually
jhehemann Oct 19, 2023
c7845cc
chore: Update packages
jhehemann Oct 19, 2023
a54e710
WIP: Implement betting strategy 'kelly criterion'
jhehemann Oct 19, 2023
b390eac
WIP: Implement betting strategy 'kelly criterion'
jhehemann Oct 19, 2023
e661e59
WIP: Implement betting strategy 'kelly criterion'
jhehemann Oct 20, 2023
3ef8dbb
WIP: Implement betting strategy 'kelly criterion'
jhehemann Oct 20, 2023
16f5aae
feat: Add confidence to kelly calculation
jhehemann Oct 20, 2023
e00dfb6
feat: Add kelly fraction parameter
jhehemann Oct 20, 2023
0d9f9e3
fix: Changed variable template
jhehemann Oct 20, 2023
42a630e
fix: Adjust bet kelly fraction datatype
jhehemann Oct 20, 2023
7cf7bba
fix: Add missing bet_kelly_fraction key in skill.yaml
jhehemann Oct 20, 2023
856c107
feat: Add max bet amount calculation as fallback for kelly bet amount
jhehemann Oct 20, 2023
94ec9d9
chore: Adjusted log variable
jhehemann Oct 20, 2023
1b35de2
feat: Restrict bet sampling to the next 48h
jhehemann Oct 20, 2023
c55f0bf
chore: Add log for short term bet filter
jhehemann Oct 20, 2023
2309b1c
chore: Convert filter to list
jhehemann Oct 20, 2023
aba93a3
fix: changed datatype of short_term_bets
jhehemann Oct 20, 2023
9f42cd9
fix: Handled negative value kelly bet
jhehemann Oct 20, 2023
0104cbd
refactor: Cap max buy amount to a fraction of available shares
jhehemann Oct 21, 2023
57d27e7
refactor: Add bet_amount to synchonized data
jhehemann Oct 21, 2023
69fda09
fix: Use net bet amount for calculating shares
jhehemann Oct 21, 2023
173f4f5
fix: Initialize bet amount with default value 0
jhehemann Oct 21, 2023
d95d4f1
feat: Activated Kelly calc
jhehemann Oct 21, 2023
fdb3306
chore: Update packages
jhehemann Oct 21, 2023
4112aa0
refactor: Add log for payload values
jhehemann Oct 21, 2023
eff5d12
fix: Adjusted log string
jhehemann Oct 21, 2023
8373687
refactor: Add threshold for minimum bankroll after kelly bet
jhehemann Oct 22, 2023
031472e
refactor: Add log for adjusted bankroll and make floor bankroll a var…
jhehemann Oct 22, 2023
efff0c7
feat: Activate kelly bet strategy
jhehemann Oct 22, 2023
4f69d83
refactor: Add loging for decision receive payload and sync data
jhehemann Oct 22, 2023
1195209
fix: Set bet amount initially to None; Remove odds
jhehemann Oct 22, 2023
d063fbd
chore: Update logging
jhehemann Oct 22, 2023
c863d7a
fix: Add non zero check for sampled bets; Adjusted logging
jhehemann Oct 22, 2023
9f604b9
Merge branch 'kelly-calc-fix' into kelly-calc
jhehemann Oct 25, 2023
14d4f39
chore: Update packages
jhehemann Oct 25, 2023
b7ace28
chore: Update package hashes manually
jhehemann Oct 25, 2023
1bc74a5
Merge branch 'main' of https://github.com/valory-xyz/trader into develop
jhehemann Oct 25, 2023
614c39f
chore: Update dependency versions manually
jhehemann Oct 25, 2023
6e1f960
Doc: Add kelly strategy explanation
jhehemann Oct 26, 2023
1bb332b
Merge branch 'main' of https://github.com/valory-xyz/trader into develop
jhehemann Oct 26, 2023
e5208f4
chore: Update packages
jhehemann Oct 26, 2023
84bfe30
doc: Add explanation for kelly calculation
jhehemann Oct 28, 2023
3e87ed7
feat: Add closing timespan for selecting bets as parameter variable
jhehemann Oct 28, 2023
0cf81d3
fix: Remove kelly bet fraction check; remove bet adjustment when high…
jhehemann Oct 29, 2023
9d830b2
fix: Add params check
jhehemann Oct 29, 2023
c4c6b84
refactor: Reactivate bet threshold based on market liquidity for test…
jhehemann Oct 29, 2023
58e413f
refactor: Remove bet threshold based on liquidity measure
jhehemann Oct 29, 2023
a9f58c8
fix: bets filtering for `kelly_criterion`
Adamantios Nov 1, 2023
8323302
fix: add missing overrides
Adamantios Nov 1, 2023
71a9ee9
refactor: remove unused `win_probability`
Adamantios Nov 1, 2023
adc3c7c
refactor: guard clauses
Adamantios Nov 1, 2023
148a232
fix: kelly return values
Adamantios Nov 1, 2023
94bcf94
refactor: remove unused `bankroll`
Adamantios Nov 1, 2023
3d832b3
refactor: do not return `None`
Adamantios Nov 1, 2023
8d92f98
style: remove unnecessary code
Adamantios Nov 1, 2023
4b1936a
fix: potential net profit calculation and unnecessary code
Adamantios Nov 1, 2023
53ceb42
fix: `_get_bet_sample_info`
Adamantios Nov 1, 2023
2116ee2
chore: format code
Adamantios Nov 1, 2023
8ec6054
Merge branch 'main' into feat/add-kelly-strategy
Adamantios Nov 1, 2023
f677722
fix: add missing contract
Adamantios Nov 1, 2023
f60751f
chore: run generators
Adamantios Nov 1, 2023
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
18 changes: 9 additions & 9 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
@@ -18,13 +18,13 @@ contracts:
- valory/gnosis_safe:0.1.0:bafybeibt7arvjzz4ah24omst74f4sfjpzrdef76yti6ml7dopsauhdzeci
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeigxqwbd6wds57ecsfkl2hf4z4vbz5gokex6nutu5zcdpw6irh573y
- valory/service_registry:0.1.0:bafybeiebuuhs7fmigfh4c5dvzt6rbm5ekwrcnz7zouyjey7yyyqmpa6dyu
- valory/market_maker:0.1.0:bafybeidaz4dol7qsrwitw5jwasjtvd2vtlxhxizwkzen5kurblwacz4biu
- valory/erc20:0.1.0:bafybeicsvxv6anl5zdlovfboftqknzqyzisyuxlkcqlespvbyv7ubga3te
- valory/market_maker:0.1.0:bafybeif4mm2s3gxtvp227yypkcnna5ftec7vajcftvtbdmqddh7nprah5m
- valory/erc20:0.1.0:bafybeibysifjwhlcn7nntsjkowdmja53ed6urfzypi6sxfc7chtheecvpi
- valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y
- valory/mech:0.1.0:bafybeiddc6pgurpyja2k64wzsb3jgcvl254s7rplgt5iooftsyfalqlbfq
- valory/conditional_tokens:0.1.0:bafybeigdarm2ssng3uuehlxto75um4hbp47rdi5si6bvv7asdopqsidbhq
- valory/realitio:0.1.0:bafybeibzyfaeaxgyqnygtduhprs47fhtskh2vnmw2cvpemqhkgc72q4wpm
- valory/realitio_proxy:0.1.0:bafybeibvndq6756qck7forgeavhdbn6ykgqs2ufyg7n5g6qdfpveatxuwy
- valory/mech:0.1.0:bafybeifaavuqr2bz7nypapjwkufc5c6vwxm5ifucmtd3w7sh42tne35nga
- valory/conditional_tokens:0.1.0:bafybeif5jwc6owfe6brmqq5sfnhrwo2ajdtt4glrmyhlqxcvtkyofahwsa
- valory/realitio:0.1.0:bafybeic3wihpzz4deguslpzlnsgrlrabclq3njwuagyaiiv6rzqujfrs6e
- valory/realitio_proxy:0.1.0:bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4
protocols:
- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii
- valory/abci:0.1.0:bafybeihmzlmmb4pdo3zkhg6ehuyaa4lhw7bfpclln2o2z7v3o6fcep26iu
@@ -41,10 +41,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeicpxn2khtaesuf4cq6ypwdmdmonlqroj2q2i6cxvpizc2y4cw66pe
- valory/termination_abci:0.1.0:bafybeieqm46zuccaagnko3qlw6p3nvoohdrfgvpmw467r5lyil2dqrzjsy
- valory/transaction_settlement_abci:0.1.0:bafybeia6cdxdlqrcwk2maw25fo7dafzd2p3rs7syropvufophk2pitzbwy
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibratoz5jx542nceiak2523nhg6yjl5gwqamgnr3f5fcocnm7a5ba
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeib6dvgbls4z3rmqc26t4vu645irf6kjhm7ifjmv7e3ikzjcvul64u
- valory/market_manager_abci:0.1.0:bafybeigmy3g2klkzdhttti2ouxf575ua5y7ajmh4a3yfpukeukqxjky47m
- valory/decision_maker_abci:0.1.0:bafybeicqwyuk35ivm4ehb4jywvxzc3eoohvmk3256k62rojidxa5fxryby
- valory/trader_abci:0.1.0:bafybeifzts5xfwhbbbivjdxnw3zlcfimadvs5evm3zjevfxviaueqqvdlu
- valory/decision_maker_abci:0.1.0:bafybeig7zb4w4ohmzxccwp2x4xxyqz3tmierzb42xlfil2n4cvpk66iaii
- valory/trader_abci:0.1.0:bafybeidwasoawrqbgenhhln7ngdhnedirdv7kljrxa2w2fau6uejjttaiu
default_ledger: ethereum
required_ledgers:
- ethereum
Loading