Mastering pandas for Finance
eBook - ePub

Mastering pandas for Finance

Michael Heydt

Partager le livre
  1. 298 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering pandas for Finance

Michael Heydt

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering pandas for Finance est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering pandas for Finance par Michael Heydt en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Business et Business Intelligence. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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...

Table des matiĂšres