Mastering pandas for Finance
eBook - ePub

Mastering pandas for Finance

Michael Heydt

Compartir libro
  1. 298 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering pandas for Finance

Michael Heydt

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering pandas for Finance un PDF/ePUB en línea?
Sí, puedes acceder a Mastering pandas for Finance de Michael Heydt en formato PDF o ePUB, así como a otros libros populares de Business y Business Intelligence. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781783985104
Categoría
Business

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...

Índice