Analyze financial data correlations
GPL-3.0 License
Analyze financial data correlations
In statistics, correlation or dependence is any statistical relationship, whether causal or not, between two random variables or bivariate data. Although in the broadest sense, "correlation" may indicate any type of association, in statistics it usually refers to the degree to which a pair of variables are linearly related. Familiar examples of dependent phenomena include the correlation between the height of parents and their offspring, and the correlation between the price of a good and the quantity the consumers are willing to purchase, as it is depicted in the so-called demand curve.
Correlations are useful because they can indicate a predictive relationship that can be exploited in practice. For example, an electrical utility may produce less power on a mild day based on the correlation between electricity demand and weather. In this example, there is a causal relationship, because extreme weather causes people to use more electricity for heating or cooling. However, in general, the presence of a correlation is not sufficient to infer the presence of a causal relationship (i.e., correlation does not imply causation).
Source: Wikipedia
pip3 install -r requirements.txt
.API_KEY
file.python3 main.py
.This will print the correlation matrix and save it to a CSV file.
For the configuration, you can change config.py
constants.
PAIR_NAMES_LIST_WITH_SOURCE
: What are your considered financial indexes?START_TIME
and END_TIME
: The time interval for the financial indexes candlesCSV_DELIMITER
: The delimiter character in the generated CSV fileAPI_KEY_FILE_PATH
: Path to the Nasdaq Data Link API key file