Python for Finance
eBook - ePub

Python for Finance

Yuxing Yan

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

Python for Finance

Yuxing Yan

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

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 Python for Finance un PDF/ePUB en línea?
Sí, puedes acceder a Python for Finance de Yuxing Yan en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Aplicaciones de escritorio. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice