Coder Social home page Coder Social logo

erfaniaa / financial-indexes-correlation Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 2.0 548 KB

Analyze financial data correlations

License: GNU General Public License v3.0

Python 100.00%
algo-trading crypto cryptocurrency data-science finance financial-analysis statistics

financial-indexes-correlation's Introduction

Financial Indexes Correlation

Analyze financial data correlations

About Correlation

  • 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

Features

  • You can run it fast, and it is easy to use.
  • There are no complexities and no database usage in this project. Even dependencies are a few.
  • It is easy to modify and customize.
  • This project generates practical information for data scientists.
  • You can read the code for educational purposes.

Sample Correlation Matrix Output

image

Run

  1. Clone the repository.
  2. Run pip3 install -r requirements.txt.
  3. Put your Nasdaq Data Link API key in the API_KEY file.
  4. Run python3 main.py.

This will print the correlation matrix and save it to a CSV file.

Config

For the configuration, you can change config.py constants.

Config.py Description

  • PAIR_NAMES_LIST_WITH_SOURCE: What are your considered financial indexes?
  • START_TIME and END_TIME: The time interval for the financial indexes candles
  • CSV_DELIMITER: The delimiter character in the generated CSV file
  • API_KEY_FILE_PATH: Path to the Nasdaq Data Link API key file

See Also

Credits

Erfan Alimohammadi and Amir Reza Shahmiri

financial-indexes-correlation's People

Contributors

erfaniaa avatar

Stargazers

 avatar Patrick Madden avatar robert rowntree avatar  avatar Enes Cingöz avatar Mohammadreza Razavian avatar David R. Palmer avatar  avatar  avatar Mohammadreza Mohammadzadeh Asl avatar Hussein Farmani avatar hvahora avatar  avatar rmoscoloni avatar Amin Karbas avatar  avatar Jonathan Marshall avatar Harald Kirkerød avatar Ali Vahdani avatar Reza Aleyasin avatar Steven Evans avatar Valeriy Zhirnov avatar Mohammad Hassan Shahbazi avatar  avatar Bryan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.