Python for Finance
eBook - ePub

Python for Finance

Yuxing Yan

Condividi libro
  1. 408 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Python for Finance

Yuxing Yan

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

In Detail

Python is a free and powerful tool that can be used to build a financial calculator and price options, and can also explain many trading strategies and test various hypotheses. This book details the steps needed to retrieve time series data from different public data sources.

Python for Finance explores the basics of programming in Python. It is a step-by-step tutorial that will teach you, with the help of concise, practical programs, how to run various statistic tests. This book introduces you to the basic concepts and operations related to Python. You will also learn how to estimate illiquidity, Amihud (2002), liquidity measure, Pastor and Stambaugh (2003), Roll spread (1984), spread based on high-frequency data, beta (rolling beta), draw volatility smile and skewness, and construct a binomial tree to price American options.

This book is a hands-on guide with easy-to-follow examples to help you learn about option theory, quantitative finance, financial modeling, and time series using Python.

Approach

A hands-on guide with easy-to-follow examples to help you learn about option theory, quantitative finance, financial modeling, and time series using Python.

Who this book is for

Python for Finance is perfect for graduate students, practitioners, and application developers who wish to learn how to utilize Python to handle their financial needs. Basic programming knowledge is helpful, but not necessary.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Python for Finance è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Python for Finance di Yuxing Yan in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Ciencia de la computación e Aplicaciones de escritorio. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2014
ISBN
9781783284375

Python for Finance


Table of Contents

Python for Finance
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why subscribe?
Free access for Packt account holders
Preface
Why Python?
A programming book written by a finance professor
Small programs oriented
Using real-world data
What this book covers
What could you achieve after reading this book?
Who this book is for
Conventions
Two ways to use the book
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introduction and Installation of Python
Introduction to Python
Installing Python
Different versions of Python
Ways to launch Python
Launching Python with GUI
Launching Python from the Python command line
Launching Python from our own DOS window
Quitting Python
Error messages
Python language is case sensitive
Initializing the variable
Finding the help window
Finding manuals and tutorials
Finding the version of Python
Summary
Exercises
2. Using Python as an Ordinary Calculator
Assigning values to variables
Displaying the value of a variable
Error messages
Can't call a variable without assignment
Choosing meaningful names
Using dir() to find variables and functions
Deleting or unsigning a variable
Basic math operations – addition, subtraction, multiplication, and division
The power function, floor, and remainder
A true power function
Choosing appropriate precision
Finding out more information about a specific built-in function
Listing all built-in functions
Importing the math module
The pi, e, log, and exponential functions
"import math" versus "from math import *"
A few frequently used functions
The print() function
The type() function
Last expression _ (underscore)
Combining two strings
The upper() function
The tuple data type
Summary
Exercises
3. Using Python as a Financial Calculator
Writing a Python function without saving it
Default input values for a function
Indentation is critical in Python
Checking the existence of our functions
Defining functions from our Python editor
Activating our function using the import function
Debugging a program from a Python editor
Two ways to call our pv_f() function
Generating our own module
Types of comments
The first type of comment
The second type of comment
Finding information about our pv_f() function
The if() function
Annuity estimation
Converting the interest rates
Continuously compounded interest rate
A data type – list
Net present value and the NPV rule
Defining the payback period and the payback period rule
Defining IRR and the IRR rule
Showing certain files in a specific subdirectory
Using Python as a financial calculator
Adding our project directory to the path
Summary
Exercises
4. 13 Lines of Python to Price a Call Option
Writing a program – the empty shell method
Writing a program – the comment-all-out method
Using and debugging other programs
Summary
Exercises
5. Introduction to Modules
What is a module?
Importing a module
Adopting a short name for an imported module
Showing all functions in an imported module
Comparing "import math" and "from math import *"
Deleting an imported module
Importing only a few needed functions
Finding out all built-in modules
Finding out all the available modules
Finding the location of an imported module
More information about modules
Finding a specific uninstalled module
Module dependency
Summary
Exercises
6. Introduction to NumPy and SciPy
Installation of NumPy and SciPy
Launching Python from Anaconda
Examples of using NumPy
Examples of using SciPy
Showing all functions in NumPy and SciPy
More informatio...

Indice dei contenuti