Lean
$LEAN_TAG$
CorrelationType.cs
1
/*
2
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
namespace
QuantConnect.Indicators
17
{
18
/// <summary>
19
/// Defines the different types of Correlation
20
/// </summary>
21
public
enum
CorrelationType
22
{
23
/// <summary>
24
/// Pearson Correlation (Product-Moment Correlation):
25
/// Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1.
26
/// A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect
27
/// negative linear relationship, and 0 indicates no linear relationship.
28
/// It assumes that both datasets are normally distributed and the relationship is linear.
29
/// It is sensitive to outliers which can affect the correlation significantly.
30
/// </summary>
31
Pearson
,
32
/// <summary>
33
/// Spearman Correlation (Rank Correlation):
34
/// Measures the strength and direction of the monotonic relationship between two datasets.
35
/// Instead of calculating the coefficient using raw data, it uses the rank of the data points.
36
/// This method is non-parametric and does not assume a normal distribution of the datasets.
37
/// It's useful when the data is not normally distributed or when the relationship is not linear.
38
/// Spearman's correlation is less sensitive to outliers than Pearson's correlation.
39
/// The coefficient also ranges from -1 to 1 with similar interpretations for the values,
40
/// but it reflects monotonic relationships rather than only linear ones.
41
/// </summary>
42
Spearman
43
44
}
45
}
Indicators
CorrelationType.cs
Generated by
1.8.17