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

Risk metrics over time #80

Open
vaughnmck opened this issue Jul 13, 2022 · 2 comments · Fixed by #90
Open

Risk metrics over time #80

vaughnmck opened this issue Jul 13, 2022 · 2 comments · Fixed by #90
Assignees
Labels
urgent This is a priority

Comments

@vaughnmck
Copy link
Member

vaughnmck commented Jul 13, 2022

Problem

Prime have asked if they can use Whip to evaluate whether their historical DAO-to-DAO swaps have reduced their treasury risk. The application does not currently show historical risk metrics, so Whip cannot be used for this use case.

Solution

Image

Introduce a chart view that plots Treasury Volatility and Return vs. ETH against time

Volatility

TBC

Return vs ETH

TBC

Prototype: https://www.figma.com/proto/6OjsOx8nzXvAJVhasOdsiP/Prototype?page-id=0%3A1&node-id=98%3A178&viewport=929%2C-2829%2C2.21&scaling=min-zoom&starting-point-node-id=98%3A178

Interaction: https://www.dropbox.com/s/chgpeu7vzirzdw3/Chart%20Selector%20Dropdown.mov?dl=0

@vaughnmck vaughnmck added the urgent This is a priority label Jul 13, 2022
@vaughnmck vaughnmck self-assigned this Jul 14, 2022
@acemasterjb
Copy link
Contributor

acemasterjb commented Jul 19, 2022

For volatility, this is a pretty straight forward change on the backend and would essentially cause the volatility property of the api/portfolio's assets.<asset_name> response to return a dict instead of a scalar.

Here's an example of one of the entries in the dict: "2021-08-08T00:00:00.000Z":0.1994291512 so the key is a iso timestamp and the value is the std_dev observation for that date. A returns property will also be added with the same format.

It can also be a unix timestamp, let me know which is better for frontend @vaughnmck, @lajarre. See branch here.

@acemasterjb
Copy link
Contributor

Matter of fact, since the indexes for volatility and returns are aligned, I guess it would make more sense to just return one property (volatility_returns or metrics) where the value would contain the metric values for each.

An entry for each date would then be something like "2021-07-26T00:00:00.000Z":{"std_dev":0.1659022648,"returns":-0.1895128901}.

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

Successfully merging a pull request may close this issue.

2 participants