Calculates correlation coefficient between all symbols in MetaTrader5 Market Watch.
# Setup
1) Set up your MetaTrader 5 environment ensuring that all symbols that you would like to assess for correlation are shown in your Market Watch window;
2) Set up your python environment; and
3) Install the required libraries.
```
pip install -r mt5-correlation\requirements.txt
```
# Usage
If you set up a virtual environment in the Setup step, ensure this is activated. Then run the script.
```
python -m mt5_correlations\mt5_correlations.py
```
A .csv file containing the correlation coefficient for all combinations of sybmols from the MetaTrader market watch will be produced in the current directory.
|Symbol 1 |Symbol 2 |Coefficient|UTC Date From |UTC Date To |Timeframe|
* The smallest set of price data is no less than 90% of the size of the largest set;
* The overlapping prices between both sets of price data contains no less than 90% of the prices in the smallest set;
* The pearsonr p-value for the calculated coefficient is less than 0.05.
These settings can all be changed in the call to Correlation.calculate_coefficient by passing values for max_set_size_diff_pct; overlap_pct; or max_p_value.