Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python for Finance

You're reading from   Mastering Python for Finance Understand, design, and implement state-of-the-art mathematical and statistical applications used in finance with Python

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher Packt
ISBN-13 9781784394516
Length 340 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Python for Financial Applications FREE CHAPTER 2. The Importance of Linearity in Finance 3. Nonlinearity in Finance 4. Numerical Procedures 5. Interest Rates and Derivatives 6. Interactive Financial Analytics with Python and VSTOXX 7. Big Data with Python 8. Algorithmic Trading 9. Backtesting 10. Excel with Python Index

Going deeper – Hadoop for finance


Now that we know how to use Hadoop to perform a simple word count on a fairly large text file, we can take a step further and use Hadoop for quantitative analysis. For a start, we can count the number of historical intraday percentage price changes of a stock.

Obtaining IBM stock prices from Yahoo! Finance

To obtain a dataset, we can use the historical stock prices available from Yahoo! Finance. Using Firefox or any web browser in your CentOS environment, you can download the historical daily prices for a stock counter as a CSV file using the following link

http://ichart.finance.yahoo.com/table.csv?s=IBM

In this example, we will use IBM as our example stock. Download the file to the Downloads folder of your home directory and rename it as ibm.csv. If we take a look at the contents of the CSV file, the daily stock prices go all the way back to 1962.

Then run the following command in the Terminal to copy our target CSV file to the Hadoop HDFS file store:

[cloudera...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime