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

Financial analytics of SX5E and V2TX


Another nifty function of pandas is the describe function that gives us a summary statistics of every value inside each column of the Pandas DataFrame object:

>>>  print data.describe()
         EUROSTOXX       VSTOXX
count  4072.000000  4048.000000
mean   3254.538183    25.305428
std     793.191950     9.924404
min    1809.980000    11.596600
25%    2662.460000    18.429500
50%    3033.880000    23.168600
75%    3753.542500    28.409550
max    5464.430000    87.512700
[8 rows x 2 columns]

Pandas allows the values in the DataFrame object to be visualized as a graph using the plot function. Let's plot the EURO STOXX 50 and VSTOX to see how they look like over the years:

>>> from pylab import *
>>> data.plot(subplots=True,
...           figsize=(10, 8),          
...           color="blue",
...           grid=True)
>>> show()
Populating the interactive namespace from numpy and matplotlib
array([<matplotlib.axes.AxesSubplot...
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 $19.99/month. Cancel anytime