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

Comprehensive Testing of the Present Value Formulation #375

Closed
jrhea opened this issue Jun 21, 2023 · 2 comments
Closed

Comprehensive Testing of the Present Value Formulation #375

jrhea opened this issue Jun 21, 2023 · 2 comments

Comments

@jrhea
Copy link
Contributor

jrhea commented Jun 21, 2023

The idea here is to implement a methodical way of comparing the Present Value formulation to the various ways a set of trades could close. To do this, we can think of each open trade as having certain attributes: size (as a percent of liquidity), open/close, % mature, etc. We then close them in different orderings based on how they are sorted. For example, the following matrix would be a full factorial set of orderings to test against against the Present Value:

  • size (high to low), % mature ( high to low), long/short
  • size (high to low), % mature ( high to low), short/long
  • size (high to low), % mature ( low to high), long/short
  • size (high to low), % mature ( low to high), short/long
  • size (low to high), % mature ( high to low), long/short
  • size (low to high), % mature ( high to low), short/long
  • size (low to high), % mature ( low to high), long/short
  • size (low to high), % mature ( low to high), short/long

Each trial would contain a decent sample size (probably at least 30) of trades and test the full factorial set of orderings against the Present Value. After running a few hundred trials, we should be able to determine what (if any) attributes cause the largest deviation from the Present Value

@wakamex
Copy link
Contributor

wakamex commented Jun 30, 2023

what if we... close them all at the same time? 🤯

@dpaiton
Copy link
Contributor

dpaiton commented Jan 10, 2024

PV is expected to be fairly invariant to these changes now, so we will add PV checks with a tolerance to the path independence interactive test notebook instead of writing up a new analysis notebook to do Jonny's original experiment. Issue here: delvtech/agent0#1123

@jrhea jrhea closed this as completed Jan 26, 2024
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

No branches or pull requests

4 participants