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
A python wrapper for Alpha Vantage API for financial data.

alpha_vantage Python module to get stock data/cryptocurrencies from the Alpha Vantage API Alpha Vantage delivers a free API for real time financial da

Romel Torres 3.8k Jan 07, 2023
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
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
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
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
Yahoo! Finance market data downloader (+faster Pandas Datareader)

Yahoo! Finance market data downloader Ever since Yahoo! finance decommissioned their historical data API, many programs that relied on it to stop work

Ran Aroussi 8.4k Jan 01, 2023
Software for quick purchase of mystery boxes on Binance.

english | русский язык Software for quick purchase of mystery boxes on Binance. Purpose Installation & setup Motivation Specification Disclaimer Purpo

Ellis 5 Mar 08, 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
stock data on eink with raspberry

small python skript to display tradegate data on a waveshare e-ink important you need locale "de_AT.UTF-8 UTF-8" installed. do so in raspi-config's Lo

Simon Oberhammer 24 Feb 22, 2022
Technical Analysis Library using Pandas and Numpy

Technical Analysis Library in Python It is a Technical Analysis library useful to do feature engineering from financial time series datasets (Open, Cl

Darío López Padial 3.4k Jan 02, 2023
Performance analysis of predictive (alpha) stock factors

Alphalens Alphalens is a Python Library for performance analysis of predictive (alpha) stock factors. Alphalens works great with the Zipline open sour

Quantopian, Inc. 2.5k Dec 28, 2022
personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

wenbin wu 23 Oct 30, 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
Zipline, a Pythonic Algorithmic Trading Library

Zipline is a Pythonic algorithmic trading library. It is an event-driven system for backtesting. Zipline is currently used in production as the backte

Quantopian, Inc. 15.7k Jan 02, 2023
ARCH models in Python

arch Autoregressive Conditional Heteroskedasticity (ARCH) and other tools for financial econometrics, written in Python (with Cython and/or Numba used

Kevin Sheppard 1k Jan 04, 2023
Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.

Stock Statistics/Indicators Calculation Helper VERSION: 0.3.2 Introduction Supply a wrapper StockDataFrame based on the pandas.DataFrame with inline s

Cedric Zhuang 1.1k Dec 28, 2022
This repository contains a set of plugins for Volatility 3

volatility_plugins This repository contains a set of plugins for Volatility 3 These plugins are not compatible with Volatility 2 To use these plugins

Immersive-Labs-Sec 10 Nov 30, 2022
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
crypto utilities as a way of learning

cryptos Just me developing a pure Python from-scratch zero-dependency implementation of Bitcoin for educational purposes. This includes a lot of the c

Andrej 958 Jan 02, 2023