Mastering pandas for Finance
eBook - ePub

Mastering pandas for Finance

Michael Heydt

Buch teilen
  1. 298 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Mastering pandas for Finance

Michael Heydt

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Mastering pandas for Finance als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Mastering pandas for Finance von Michael Heydt im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Business & Business Intelligence. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2015
ISBN
9781783985104

Mastering pandas for Finance


Table of Contents

Mastering pandas for Finance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with pandas Using Wakari.io
What is Wakari?
Creating a Wakari cloud account
Updating existing packages
Installing new packages
Installing the samples in Wakari
Summary
2. Introducing the Series and DataFrame
Notebook setup
The main pandas data structures – Series and DataFrame
The Series
The DataFrame
The basics of the Series and DataFrame objects
Creating a Series and accessing elements
Size, shape, uniqueness, and counts of values
Alignment via index labels
Creating a DataFrame
Example data
Selecting columns of a DataFrame
Selecting rows of a DataFrame using the index
Slicing using the [] operator
Selecting rows by the index label and location – .loc[] and .iloc[]
Selecting rows by the index label and/or location – .ix[]
Scalar lookup by label or location using .at[] and .iat[]
Selecting rows using the Boolean selection
Arithmetic on a DataFrame
Reindexing the Series and DataFrame objects
Summary
3. Reshaping, Reorganizing, and Aggregating
Notebook setup
Loading historical stock data
Organizing the data for the examples
Reorganizing and reshaping data
Concatenating multiple DataFrame objects
Merging DataFrame objects
Pivoting
Stacking and unstacking
Melting
Grouping and aggregating
Splitting
Aggregating
Summary
4. Time-series
Notebook setup
Time-series data and the DatetimeIndex
Creating time-series with specific frequencies
Representing intervals of time using periods
Shifting and lagging time-series data
Frequency conversion of time-series data
Resampling of time-series
Summary
5. Time-series Stock Data
Notebook setup
Obtaining historical stock and index data
Fetching historical stock data from Yahoo!
Fetching index data from Yahoo!
Visualizing financial time-series data
Plotting closing prices
Plotting volume-series data
Combined price and volumes
Plotting candlesticks
Fundamental financial calculations
Calculating simple daily percentage change
Calculating simple daily cumulative returns
Analyzing the distribution of returns
Histograms
Q-Q plots
Box-and-whisker plots
Comparison of daily percentage change between stocks
Moving windows
Volatility calculation
Rolling correlation of returns
Least-squares regression of returns
Comparing stocks to the S&P 500
Summary
6. Trading Using Google Trends
Notebook setup
A brief on Quantifying Trading Behavior in Financial Markets Using Google Trends
Data collection
The data from the paper
Gathering our own DJIA data from Quandl
Google Trends data
Generating order signals
Computing returns
Cumulative returns and the result of the strategy
Summary
7. Algorithmic Trading
Notebook setup
The process of algorithmic trading
Momentum strategies
Mean-reversion strategies
Moving averages
Simple moving average
Exponentially weighted moving average
Technical analysis techniques
Crossovers
Pairs trading
Algo trading with Zipline
Algorithm – buy apple
Algorithm – dual moving average crossover
Algorithm – pairs trade
Summary
8. Working with Options
Introducing options
Notebook setup
Options data from Yahoo! Finance
Implied volatility
Volatility smirks
Calculating payoff on options
The call option payoff calculation
The put option payoff calculation
Profit and loss calculation
The call option profit and loss for a buyer
The call option profit and loss for the seller
Combined payoff charts
The put option profit and loss for a buyer
The put option profit and loss for the seller
The pricing of options
The pricing of options with Black-Scholes
Deriving the model
The value of the cash to buy
The value of the stock received
The formulas
d1 and d2
Black-Scholes using Mibian
Charting option price change over time
The Greeks
Calculation and visualization
Summary
9. Portfolios and Risk
Notebook setup
An overview of modern portfolio theory
Concept
Mathematical modeling of a portfolio
Risk...

Inhaltsverzeichnis