Python for Finance
eBook - ePub

Python for Finance

Yuxing Yan

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

Python for Finance

Yuxing Yan

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

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 Python for Finance als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Python for Finance von Yuxing Yan im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Desktop Applications. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis