Book Image

Python for Finance

By : Yuxing Yan
Book Image

Python for Finance

By: Yuxing Yan

Overview of this book

Table of Contents (20 chapters)
Python for Finance
About the Author
About the Reviewers

Python for high-frequency data

High-frequency data is referred to second-by-second or millisecond-by-millisecond transaction and quotation data. The New York Stock Exchange's TAQ (Trade and Quotation) database is a typical example ( The following program can be used to retrieve high-frequency data from Google Finance:

>>>import re, string
>>>import pandas as pd
>>>ticker='AAPL'         # input a ticker
>>>f1="c:/temp/ttt.txt"  # ttt will be replace with aboove sticker

In the preceding program, we have two input variables: ticker and path. After we choose...