Python for Algorithmic Trading

Höfundur Yves Hilpisch

Útgefandi O’Reilly Media, Inc.

Snið ePub

Print ISBN 9781492053354

Útgáfa 1

Útgáfuár

8.490 kr.

Description

Efnisyfirlit

  • Preface
  • Contents and Structure
  • Who This Book Is For
  • Conventions Used in This Book
  • Using Code Examples
  • O’Reilly Online Learning
  • How to Contact Us
  • Acknowledgments
  • 1. Python and Algorithmic Trading
  • Python for Finance
  • Python Versus Pseudo-Code
  • NumPy and Vectorization
  • pandas and the DataFrame Class
  • Algorithmic Trading
  • Python for Algorithmic Trading
  • Focus and Prerequisites
  • Trading Strategies
  • Simple Moving Averages
  • Momentum
  • Mean Reversion
  • Machine and Deep Learning
  • Conclusions
  • References and Further Resources
  • 2. Python Infrastructure
  • Conda as a Package Manager
  • Installing Miniconda
  • Basic Operations with Conda
  • Conda as a Virtual Environment Manager
  • Using Docker Containers
  • Docker Images and Containers
  • Building a Ubuntu and Python Docker Image
  • Using Cloud Instances
  • RSA Public and Private Keys
  • Jupyter Notebook Configuration File
  • Installation Script for Python and Jupyter Lab
  • Script to Orchestrate the Droplet Set Up
  • Conclusions
  • References and Further Resources
  • 3. Working with Financial Data
  • Reading Financial Data From Different Sources
  • The Data Set
  • Reading from a CSV File with Python
  • Reading from a CSV File with pandas
  • Exporting to Excel and JSON
  • Reading from Excel and JSON
  • Working with Open Data Sources
  • Eikon Data API
  • Retrieving Historical Structured Data
  • Retrieving Historical Unstructured Data
  • Storing Financial Data Efficiently
  • Storing DataFrame Objects
  • Using TsTables
  • Storing Data with SQLite3
  • Conclusions
  • References and Further Resources
  • Python Scripts
  • 4. Mastering Vectorized Backtesting
  • Making Use of Vectorization
  • Vectorization with NumPy
  • Vectorization with pandas
  • Strategies Based on Simple Moving Averages
  • Getting into the Basics
  • Generalizing the Approach
  • Strategies Based on Momentum
  • Getting into the Basics
  • Generalizing the Approach
  • Strategies Based on Mean Reversion
  • Getting into the Basics
  • Generalizing the Approach
  • Data Snooping and Overfitting
  • Conclusions
  • References and Further Resources
  • Python Scripts
  • SMA Backtesting Class
  • Momentum Backtesting Class
  • Mean Reversion Backtesting Class
  • 5. Predicting Market Movements with Machine Learning
  • Using Linear Regression for Market Movement Prediction
  • A Quick Review of Linear Regression
  • The Basic Idea for Price Prediction
  • Predicting Index Levels
  • Predicting Future Returns
  • Predicting Future Market Direction
  • Vectorized Backtesting of Regression-Based Strategy
  • Generalizing the Approach
  • Using Machine Learning for Market Movement Prediction
  • Linear Regression with scikit-learn
  • A Simple Classification Problem
  • Using Logistic Regression to Predict Market Direction
  • Generalizing the Approach
  • Using Deep Learning for Market Movement Prediction
  • The Simple Classification Problem Revisited
  • Using Deep Neural Networks to Predict Market Direction
  • Adding Different Types of Features
  • Conclusions
  • References and Further Resources
  • Python Scripts
  • Linear Regression Backtesting Class
  • Classification Algorithm Backtesting Class
  • 6. Building Classes for Event-Based Backtesting
  • Backtesting Base Class
  • Long-Only Backtesting Class
  • Long-Short Backtesting Class
  • Conclusions
  • References and Further Resources
  • Python Scripts
  • Backtesting Base Class
  • Long-Only Backtesting Class
  • Long-Short Backtesting Class
  • 7. Working with Real-Time Data and Sockets
  • Running a Simple Tick Data Server
  • Connecting a Simple Tick Data Client
  • Signal Generation in Real Time
  • Visualizing Streaming Data with Plotly
  • The Basics
  • Three Real-Time Streams
  • Three Sub-Plots for Three Streams
  • Streaming Data as Bars
  • Conclusions
  • References and Further Resources
  • Python Scripts
  • Sample Tick Data Server
  • Tick Data Client
  • Momentum Online Algorithm
  • Sample Data Server for Bar Plot
  • 8. CFD Trading with Oanda
  • Setting Up an Account
  • The Oanda API
  • Retrieving Historical Data
  • Looking Up Instruments Available for Trading
  • Backtesting a Momentum Strategy on Minute Bars
  • Factoring In Leverage and Margin
  • Working with Streaming Data
  • Placing Market Orders
  • Implementing Trading Strategies in Real Time
  • Retrieving Account Information
  • Conclusions
  • References and Further Resources
  • Python Script
  • 9. FX Trading with FXCM
  • Getting Started
  • Retrieving Data
  • Retrieving Tick Data
  • Retrieving Candles Data
  • Working with the API
  • Retrieving Historical Data
  • Retrieving Streaming Data
  • Placing Orders
  • Account Information
  • Conclusions
  • References and Further Resources
  • 10. Automating Trading Operations
  • Capital Management
  • Kelly Criterion in Binomial Setting
  • Kelly Criterion for Stocks and Indices
  • ML-Based Trading Strategy
  • Vectorized Backtesting
  • Optimal Leverage
  • Risk Analysis
  • Persisting the Model Object
  • Online Algorithm
  • Infrastructure and Deployment
  • Logging and Monitoring
  • Visual Step-by-Step Overview
  • Configuring Oanda Account
  • Setting Up the Hardware
  • Setting Up the Python Environment
  • Uploading the Code
  • Running the Code
  • Real-Time Monitoring
  • Conclusions
  • References and Further Resources
  • Python Script
  • Automated Trading Strategy
  • Strategy Monitoring
  • Appendix. Python, NumPy, matplotlib, pandas
  • Python Basics
  • Data Types
  • Data Structures
  • Control Structures
  • Python Idioms
  • NumPy
  • Regular ndarray Object
  • Vectorized Operations
  • Boolean Operations
  • ndarray Methods and NumPy Functions
  • ndarray Creation
  • Random Numbers
  • matplotlib
  • pandas
  • DataFrame Class
  • Numerical Operations
  • Data Selection
  • Boolean Operations
  • Plotting with pandas
  • Input-Output Operations
  • Case Study
  • Conclusions
  • Further Resources
  • Index
Show More

Additional information

Veldu vöru

Rafbók til eignar

Reviews

There are no reviews yet.

Be the first to review “Python for Algorithmic Trading”

Netfang þitt verður ekki birt. Nauðsynlegir reitir eru merktir *

Aðrar vörur

0
    0
    Karfan þín
    Karfan þín er tómAftur í búð