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

Fix #1263: Transform lake data into prediction signals #1297

Merged
merged 12 commits into from
Jun 26, 2024

Conversation

kdetry
Copy link
Contributor

@kdetry kdetry commented Jun 25, 2024

Fixes #1263

Changes proposed in this PR:

  • The lake data is used in the sim engine iteration

@kdetry kdetry requested a review from KatunaNorbert June 25, 2024 13:24
addr
for addr, feed in contracts.items()
if feed.symbol
== f"{self.predict_feed.pair.base_str}/{self.predict_feed.pair.quote_str}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use self.predict_feed.pair.pair_str instead of f"{self.predict_feed.pair.base_str}/{self.predict_feed.pair.quote_str}"

slot,
CASE
WHEN roundSumStakes = 0.0 THEN NULL
WHEN roundSumStakesUp = 0.0 THEN NULL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this case when roundSumStakesUp = 0.0 the value shouldn't be NULL because maybe all the predictoors have staked down. It should be NULL only if roundSumStakes = 0.0

@@ -271,6 +291,51 @@ def save_state(self, i: int, N: int):
return True, False

@enforce_types
def _get_prediction_dataset(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you rename this and the test to _get_predictions_signals_data? This way is more specific

@kdetry kdetry merged commit 598bb41 into issue-1257-use-chain-prediction-in-trading-sim Jun 26, 2024
4 checks passed
@kdetry kdetry deleted the issue-1263 branch June 26, 2024 13:09
KatunaNorbert added a commit that referenced this pull request Jul 4, 2024
* Fix 1262: Get prediction data for sim (PR #1265)

* added new field to ppss for type of prediction source

* add network param to sim cli and make fetch work

* verify there is enough data in database and write test

* Fix #1263: Transform lake data into prediction signals (#1297)

* change ppss config to better fit the 2 prediction sources

* get feed contract address from duckDB (#1311)

* Fix #1316: Update readme with chain data predictions signals inside trading (#1320)

* Fix #1313: mock GQLDataFactory for the sim engine (#1315)

* Stop tracking lake_data/ folder
trizin added a commit that referenced this pull request Jul 18, 2024
…#1341)

* Fix 1262: Get prediction data for sim (PR #1265)

* added new field to ppss for type of prediction source

* add network param to sim cli and make fetch work

* verify there is enough data in database and write test

---------

Co-authored-by: Mustafa Tuncay <[email protected]>

* Fix #1263: Transform lake data into prediction signals (#1297)

* issue-1263: sim_engine changes

* issue-1263: part 2

* test fixes

* removed unnecessary console logs

* fix model var imps plot on chain data

* fix mypy and pylint

* issue-1263: fixes

* issue-1263: tests will be fixed at the epic branch

* change ppss config to better fit the 2 predictions

* add try catch around gql update and fix pylint

---------

Co-authored-by: Norbert <[email protected]>

* get feed contract address from duckDB (#1311)

* Fix #1316: Update readme with chain data predictions signals inside trading (#1320)

* update readmes

* Fix #1313: mock GQLDataFactory for the sim engine (#1315)

* Stop tracking lake_data/ folder

* clear_test_db is added to test_get_predictions_signals_data, removed console logs

---------

Co-authored-by: Norbert <[email protected]>

* review fixes

* review fixes

* fixes

* moved ppss validation to ppss class

* use parameter names when calling sim test dict function

* removed print

* fix failint test in trader agent system

* Default to mainnet and revert changes

* Revert values

* remove redundant code and move functions

* update tests

* SimEngineChainPredictions class

* better name

* revert

* use dev

* format

* more improvements

* remove check and verify

* remove test

* verify_use_chain_data_in_syms_dependencies

* move tests

* verify_use_chain_data_in_syms_dependencies

* formatting

* make use_own_model optional

* remove param

* remove

* move import

* remove unused import

* revert changes

* remove unused

* revert

* empty_fig

* update imports

* linter

* Use dict

* update test

* linter

* mypy

* remove def

* fix insert to table db function is depricated

* move under _init_loop_attributes

* shorter error

* rename to prob up

* improvements to readme

* mypy

* separate source of predictions

---------

Co-authored-by: Norbert <[email protected]>
Co-authored-by: Mustafa Tuncay <[email protected]>
Co-authored-by: Norbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants