如何将多种措施合并为一项措施
我有几个衡量指标:
- 损益 (PNL)。
- 胜负比(W2L)。
- 平均增益回撤比 (AG2AD)。
- 最大增益与最大回撤比 (MG2MD)。
- 连续收益与连续损失的比率(NCG2NCL)。
如果只有 3 个度量(A、B、C),那么我可以将“总”度量表示为 3D 向量的大小:
R = SQRT(A^2 + B^2 + C^2)
如果我想要将这 5 个度量组合成一个值,将它们表示为 5D 向量的大小是否有意义?有没有办法对某些指标(例如盈亏)给予更多“权重”?有没有更好的方法将它们结合起来?
更新:
我正在尝试编写一个函数(在 C# 中),该函数接受 5 个度量并以线性方式表示它们,以便我可以将多维值折叠为单个线性值。这样做的要点是,它将允许我只使用一个变量(节省内存),并且它将提供一种在两组度量之间进行比较的快速方法。几乎就像构建哈希值一样,但是每个哈希都可以用于比较(即>、<、==)。
这些值的统计显着性与其列出的顺序相同:PNL 最显着,而 NCG2NCL 最不显着。
I have several measures:
- Profit and loss (PNL).
- Win to loss ratio (W2L).
- Avg gain to drawdown ratio (AG2AD).
- Max gain to maximum drawdown ratio (MG2MD).
- Number of consecutive gains to consecutive losses ratio (NCG2NCL).
If there were only 3 measures (A, B, C), then I could represent the "total" measure as a magnitude of a 3D vector:
R = SQRT(A^2 + B^2 + C^2)
If I want to combine those 5 measures into a single value, would it make sense to represent them as the magnitude of a 5D vector? Is there a way to put more "weight" on certain measures, such as the PNL? Is there a better way to combine them?
Update:
I'm trying to write a function (in C#) that takes in 5 measures and represents them in a linear manner so I can collapse the multidimensional values into a single linear value. The point of this is that it will allow me to only use one variable (save memory) and it will provide a fast method of comparison between two sets of measures. Almost like building a hash value, but each hash can be used for comparison (i.e. >, <, ==).
The statistical significance of the values is the same as the order they're listed: PNL is the most significant while NCG2NCL is the least significant.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果我想将这 5 个度量组合成一个值,将它们表示为 5D 向量的大小是否有意义?
绝对可以,如果结果适合您。
有没有办法对某些指标(例如盈亏)给予更多“权重”?
您可以引入恒定权重
有更好的方法来组合它们吗?
这取决于您的要求。特别是,使用简单的 sum
|A| 没有任何问题。 + |B| + |C|
,这将更好地支持“平均”属性。即,使用公式(0, 0, 9)
给出的总和比(3, 3, 3)
好得多,而使用简单的总和,它们将是等效的。一般来说,Oli是对的:你必须自己做出决定,没有算法书可以为你评估需求。
If I want to combine those 5 measures into a single value, would it make sense to represent them as the magnitude of a 5D vector?
Absolutely, if result suits you.
Is there a way to put more "weight" on certain measures, such as the PNL?
You can introduce constant weights
Is there a better way to combine them?
That depends on your requirements. In particular, there's nothing wrong with using simple sum
|A| + |B| + |C|
, that would favour 'average' properties better. I.e., with your formula(0, 0, 9)
gives much better total than(3, 3, 3)
, while with the simple sum they would be equivalent.Generally speaking Oli is right: you'll have to make the decision yourself, no algorithm book can evaluate the requirements for you.
将措施组合成单一值是有风险的。不管怎样,你都会丢失信息。如果我有 3 个橙子、一个苹果和几片面包,我可以通过多种方式将它们组合起来:
无论我得到哪个结果都没有第一个结果有意义。通过一块牛排和一杯水,其价值就变得更没有意义了。结果总是对食物的供应进行某种程度的衡量。
您需要弄清楚如何将各种值转换为具有等效尺度(线性或对数)和等效值(1 X ~= 1 Y ~= 1Z)的值。此时,简单的求和或乘积可能就足够了。就您的情况而言,您似乎正在尝试结合各种财务回报衡量标准。您使用的一些衡量标准不具有高度可比性。
Combining measures into a single value is risky at best. However you do it you loose information. If I have 3 oranges, an apple and a couple of slices of bread I can combine them in various ways:
Whichever result I get is less meaningful than the first. Through in a steak and a glass of water and the value becomes even less meaningful. The result is always some measure of serving of food.
You need to figure out how to convert your various values into values with equivelent scales (linear or log) and equivalent value (1 X ~= 1 Y ~= 1Z). At that point a simple sum or product may be sufficient. In your case, it appears you are trying to combine various measure of financial return. Some of the measures you are using are not highly comparable.
正如其他人所指出的,组合价值的方式有无数种。您已将问题标记为机器学习和人工智能,这表明您可能想找到将它们结合起来的最佳方式?例如。提出一个“善良”指标,并尝试从其他指标中建立模型。然后还有一系列机器学习算法 - 例如。贝叶斯模型将是一个好的开始:速度快,通常表现良好,即使不一定是最好的。
As others have noted, there are an infinite number of ways of combining values. You've tagged the question machine-learning and artificial-intelligence, which suggests you might want to find the optimum way of combining them? Eg. come up with a "goodness" metric, and try to model this from the others. Then there are a range of machine learning algorithms - eg. a Bayesian Model would be a good start: Fast, generally performs well if not necessarily the best.
我建议使用主成分分析来实现这一点。这将为您提供系数所需的权重。您可以通过 stat 包或使用打包的 C# 函数来执行此操作。
——拉尔夫·温特斯
I would suggest implementing this using principal component analysis. That will give you the weights you need for your coefficients. You can either do this via a stat package or use a packaged C# function.
-Ralph Winters