This repository provides all Python codes and Jupyter Notebooks of the book Python for Finance

Related tags

Financepy4fi
Overview

Python for Finance (O'Reilly)

This repository provides all Python codes and Jupyter Notebooks of the book Python for Finance -- Analyze Big Financial Data by Yves Hilpisch.

Oder the book here http://shop.oreilly.com/product/0636920032441.do or under http://www.amazon.com/Python-Finance-Analyze-Financial-Data/dp/1491945281/.

There are two code versions available: for Python 3.6 and Python 2.7 (in the legacy folder; not maintained anymore).

Python Packages

There is now a yaml file for the installation of required Python packages in the repository. This is to be used with the conda package manager (see https://conda.io/docs/user-guide/tasks/manage-environments.html). If you do not have Miniconda or Anaconda installed, we recommend to install Miniconda 3.6 first (see https://conda.io/miniconda.html).

After you have cloned the repository, do on the Linux/Mac shell:

cd py4fi
conda env create -f py4fi_conda.yml
source activate py4fi
cd jupyter36
jupyter notebook

On Windows, do:

cd py4fi
conda env create -f py4fi_conda.yml
activate py4fi
cd jupyter36
jupyter notebook

Then you can navigate to the Jupyter Notebook files and get started.

Yahoo! Finance & Google Finance Issues

Recently Yahoo! Finance stopped their original financial data API service that is used in the book in many different places (and been so by many others in the field for years) via the pandas-datareader package.

One way of fixing it in some places is to simply replace data_source='yahoo' by data_source='google' (and maybe working with an alternative symbol). However, Google Finance has also changed data availability via the their API such that this does only help partially.

Another way is to use this fix: https://github.com/ranaroussi/fix-yahoo-finance -- this is done for some code in chapter 11.

In the majority of cases where financial data is used, the pandas-datareader based code has been replaced by simple pandas code that accesses data files that are now part of the repository (CSV data files provided with data as provided either by the Thomson Reuters Eikon API or by data sources from FXCM Forex Capital Markets Ltd.). This makes sure that the code base is not subject to unforeseen API changes by third parties.

Quant Platform

You can immediately use all codes and Jupyter Notebooks by registering on the Quant Platform under http://oreilly.quant-platform.com.

Python for Algorithmic Trading Course & Certificate

Check out our Python for Algorithmic Trading Course under http://pyalgo.tpq.io.

Check out also our Python for Algorithmic Trading Certificate Program under http://certificate.tpq.io.

Company Information

© Dr. Yves J. Hilpisch | The Python Quants GmbH

The Quant Platform (http://pqp.io) and all codes/Jupyter notebooks come with no representations or warranties, to the extent permitted by applicable law.

http://tpq.io | [email protected] | http://twitter.com/dyjh

Quant Platform | http://oreilly.quant-platform.com

Derivatives Analytics with Python (Wiley Finance) | http://derivatives-analytics-with-python.com

Python for Finance (O'Reilly) | http://python-for-finance.com

Python for Algorithmic Trading Course | http://pyalgo.tpq.io

Python for Finance Online Training | http://training.tpq.io

Owner
Yves Hilpisch
CEO The Python Quants & The AI Machine | Adjunct Professor of Computational Finance | Python, AI, Finance & Algorithmic Trading
Yves Hilpisch
Python sync/async framework for Interactive Brokers API

Introduction The goal of the IB-insync library is to make working with the Trader Workstation API from Interactive Brokers as easy as possible. The ma

Ewald de Wit 2k Dec 30, 2022
An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.

TensorTrade: Trade Efficiently with Reinforcement Learning TensorTrade is still in Beta, meaning it should be used very cautiously if used in producti

4k Dec 30, 2022
Common financial risk and performance metrics. Used by zipline and pyfolio.

empyrical Common financial risk metrics. Table of Contents Installation Usage Support Contributing Testing Installation pip install empyrical Usage S

Quantopian, Inc. 1k Dec 26, 2022
This repository provides all Python codes and Jupyter Notebooks of the book Python for Finance

Python for Finance (O'Reilly) This repository provides all Python codes and Jupyter Notebooks of the book Python for Finance -- Analyze Big Financial

Yves Hilpisch 1.6k Jan 03, 2023
An Algorithmic Trading Library for Crypto-Assets in Python

Service Master Develop CI Badge Catalyst is an algorithmic trading library for crypto-assets written in Python. It allows trading strategies to be eas

Enigma 2.4k Jan 05, 2023
scrilla: A Financial Optimization Application

A python application that wraps around AlphaVantage, Quandl and IEX APIs, calculates financial statistics and optimizes portfolio allocations.

Grant Moore 6 Dec 17, 2022
bt - flexible backtesting for Python

bt - Flexible Backtesting for Python bt is currently in alpha stage - if you find a bug, please submit an issue. Read the docs here: http://pmorissett

Philippe Morissette 1.6k Jan 05, 2023
'Personal Finance' is a project where people can manage and track their expenses

Personal Finance by Abhiram Rishi Pratitpati 'Personal Finance' is a project where people can manage and track their expenses. It is hard to keep trac

Abhiram Rishi Prattipati 1 Dec 21, 2021
Indicator divergence library for python

Indicator divergence library This module aims to help to find bullish/bearish divergences (regular or hidden) between two indicators using argrelextre

8 Dec 13, 2022
Beibo is a Python library that uses several AI prediction models to predict stocks returns over a defined period of time.

Beibo is a Python library that uses several AI prediction models to predict stocks returns over a defined period of time.

Santosh 54 Dec 10, 2022
Find big moving stocks before they move using machine learning and anomaly detection

Surpriver - Find High Moving Stocks before they Move Find high moving stocks before they move using anomaly detection and machine learning. Surpriver

Tradytics 1.5k Dec 31, 2022
rotki is an open source portfolio tracking, analytics, accounting and tax reporting tool that respects your privacy.

rotki is an open source portfolio tracking, analytics, accounting and tax reporting tool that respects your privacy. The mission of rotki is to bring transparency into the crypto and financial sector

Rotki 2k Dec 30, 2022
Fourth and final milestone project

Milestone Project 4: Pound Dog Click link to visit "Pound Dog" Aim of the project The aim of this project is to provide access to a website informing

Jamie Wilson 1 Oct 31, 2021
Portfolio and risk analytics in Python

pyfolio pyfolio is a Python library for performance and risk analysis of financial portfolios developed by Quantopian Inc. It works well with the Zipl

Quantopian, Inc. 4.8k Jan 08, 2023
Common financial technical indicators implemented in Pandas.

FinTA (Financial Technical Analysis) Common financial technical indicators implemented in Pandas. This is work in progress, bugs are expected and resu

1.8k Dec 31, 2022
A proper portfolio tracker. Featuring historical allocation, cash flows and real returns.

Python Portfolio Analytics A portfolio tracker featuring account transactions, historical allocation, dividends and splits management and endless perf

Simone Precicchiani 13 Aug 13, 2022
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 2,100 + stars, 580 + forks

CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 2,100 + stars, 580 + forks https://github.com/CryptoSignal/Crypto-Signal Development state:

Github.com/Signal - 2,100 + stars, 580 + forks 4.2k Jan 01, 2023
Python Algorithmic Trading Library

PyAlgoTrade PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now pos

Gabriel Becedillas 3.9k Jan 01, 2023
A banking system is a group or network of institutions that provide financial services for us

A banking system is a group or network of institutions that provide financial services for us. These institutions are responsible for operating a payment system, providing loans, taking deposits, and

UTTKARSH PARMAR 1 Oct 24, 2021
High-performance TensorFlow library for quantitative finance.

TF Quant Finance: TensorFlow based Quant Finance Library Table of contents Introduction Installation TensorFlow training Development roadmap Examples

Google 3.5k Jan 01, 2023