Open tamlyn10 opened 4 years ago
Good points.
0018-quant-risk-models.md
to provide the distrubution function information needed for price monitoring and liquidity measurement. 0018-quant-risk-models.md
. I don't understand "Does this spec also define how the risk model should return the validation ranges for risk parameters?". Are you saying that each risk model should have a function where the input is all the risk parameters and output is a boolean indicating whether the parameters are valid? If yes, then this should again go into 0018-quant-risk-models.md
again because all risk models should be able to do this. Maybe the return should be a boolean (indicating valid or not) and a string (to indicate warnings: e.g. volatility can be negative but it looks like a mistake).
👆 added two new issues based on David's comment and assigned them to myself.
Thanks @davidsiska-vega and @witgaw !
@davidsiska-vega the validation question was asked by @pand-dev on a call with Barney and I around market creation. The idea is that valid risk parameter ranges should be something that a risk model provides for the required parameters for market creation. I'm not opinionated on how it's done but @barnabee or @pand-dev may be.
@tamlyn10 I see, thanks for the clarification. So we have a decision to make: A) a risk model implements a function which takes all model parameters as input and returns a bool to say whether these are valid and an optional string with warnings
Or
B) a risk model implements a function which lists parameters it accepts and valid value ranges.
Or
C) both.
I think in the medium term A) will be easier to work with because some models could take curves / surfaces as parameters. Also some parameters have to satisfy a complex relationship between themselves that won’t be easy to describe as a range. I’m thinking about eg Feller condition in Heston model: 2\kappa \theta >\xi^2.
It can be exposed via some API node code for clients to validate proposals before submitting them.
Do you have opinions @barnabee and @pand-dev ?
With B, are the value ranges and list of parameters something that would change regularly?
The set of valid values is fixed per risk model. But possibly impossible to describe be only specifying ranges.
I've noted that in various discussion or in specs there is a request for a risk model spec.
Questions:
cc @davidsiska-vega @witgaw @barnabee