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

Use execution price in SHARKFin #198

Open
sbenthall opened this issue Feb 28, 2023 · 3 comments
Open

Use execution price in SHARKFin #198

sbenthall opened this issue Feb 28, 2023 · 3 comments
Assignees
Labels

Comments

@sbenthall
Copy link
Owner

Currently SHARKFin interacts with the Broker/Market only through the previous day's closing price.

But it would be better if we could get the average Broker execution price coming back at the end of the day.

This raises some questions about how the SHARKFin agents use either the execution or closing prices.

Simplest would be to just use the execution price as the price for SHARKFin.
I.e. realize consumer returns on the risky asset according the the execution price, and compute expectations accordingly.
However, the execution price is currently undefined when there are zero orders sent to the broker, and there will be both bid and ask prices, and these will be different.

Then there is the issue that consumers won't always be trading all of their risky assets. Do their non-traded holdings change 'value' based on the execution price?

If there are multiple prices emitted by the RPCMarket, then it can be a parameter setting which to use as the 'price' for the purpose of computing SHARKFin values.

@sbenthall sbenthall added this to the v0.4.1 G.G. SHARK milestone Feb 28, 2023
@sbenthall
Copy link
Owner Author

image

@sbenthall sbenthall self-assigned this Mar 15, 2023
sbenthall added a commit that referenced this issue Mar 16, 2023
@sbenthall
Copy link
Owner Author

167db introduces a new command line argument, --macro_price_field, which defaults to ClosingPrice.

It gets used to select which field of the AMMPS RPC response gets used as the 'price' for the purposes of computing returns.

@mesalas if you expose execution price(s) in the RPC response object, this parameter will allow us to configure which one of these SHARKFin uses.

@mesalas
Copy link
Collaborator

mesalas commented Mar 21, 2023

Implementing tracking of broker execution price
https://github.com/ZDavid/amm.engine/issues/18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants