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 calculation #248

Closed
jpmediadev opened this issue Mar 18, 2021 · 5 comments
Closed

Risk metrics calculation #248

jpmediadev opened this issue Mar 18, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@jpmediadev
Copy link
Contributor

jpmediadev commented Mar 18, 2021

The calculation of the current equity and derivatives is based on the executed orders. If this is a high-frequency trading, then everything is ok, but if the period of holding the asset is long, then the volatility of the asset during the holding period is not taken into account. Accordingly, the risk profile may be worse than it shows

perhaps this is a rare case, but nevertheless, users need to know this ...

engine.trader.generate_account_report(BINANCE)


2021-02-01 00:01:03.548456+00:00 | 100000.00000000
balance_USDT
timestamp	
2021-02-01 00:01:03.548456+00:00	100000.00000000
2021-02-01 00:02:03.601181+00:00	99933.84172000
2021-02-01 10:02:24.761131+00:00	102448.44010000
2021-02-01 10:03:24.769715+00:00	102379.72808000
2021-02-01 20:03:48.019903+00:00	101407.34064000
...	...
2021-03-16 10:27:17.481950+00:00	139150.87093000
2021-03-16 10:28:17.493945+00:00	139095.26471000
2021-03-16 20:28:36.535599+00:00	138380.19969000
2021-03-16 20:29:36.553532+00:00	138323.88780000
2021-03-16 23:59:43.809309+00:00	137616.88587000



@cjdsellers
Copy link
Member

cjdsellers commented Mar 18, 2021

You're correct, and this is indeed on the backlog to be added. So what I mean by that is there should be tracking for max drawdown and even max profit during a positions holding period.

Could be called high and low water marks maybe?

Lets keep this issue here until its added.

@jpmediadev
Copy link
Contributor Author

You're correct, and this is indeed on the backlog to be added. So what I mean by that is there should be tracking for max drawdown and even max profit during a positions holding period.

Could be called high and low water marks maybe?

probably, but I'm not sure)

@cjdsellers
Copy link
Member

cjdsellers commented Mar 19, 2021

My thoughts right now are to provide this functionality with an optional component which can subscribe to position events and also ticks, possibly it could update in time snapshots or when certain thresholds are crossed.

This may be appropriate through the RiskEngine, or a new component such as a RiskAnalyzer etc.

@cjdsellers cjdsellers added the enhancement New feature or request label Mar 19, 2021
@jpmediadev
Copy link
Contributor Author

Reasonable compromise, additional complication on demand ...

@cjdsellers cjdsellers self-assigned this May 10, 2021
@cjdsellers
Copy link
Member

Currently I feel this would be a valuable feature to aid trading analysis, however closing for now in favour of opening a more specific issue when something is being actively worked on.

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

No branches or pull requests

2 participants