Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Python for Finance

You're reading from   Python for Finance Apply powerful finance models and quantitative analysis with Python

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher
ISBN-13 9781787125698
Length 586 pages
Edition 2nd Edition
Languages
Arrow right icon
Toc

Table of Contents (23) Chapters Close

Python for Finance Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Python Basics FREE CHAPTER 2. Introduction to Python Modules 3. Time Value of Money 4. Sources of Data 5. Bond and Stock Valuation 6. Capital Asset Pricing Model 7. Multifactor Models and Performance Measures 8. Time-Series Analysis 9. Portfolio Theory 10. Options and Futures 11. Value at Risk 12. Monte Carlo Simulation 13. Credit Risk Analysis 14. Exotic Options 15. Volatility, Implied Volatility, ARCH, and GARCH Index

Index

A

  • AAA-rated bond
    • yield, retrieving / YIELD of AAA-rated bond, Altman Z-score
  • acallable bond / Bond evaluation
  • adjusted beta
    • about / Adjusted beta
    • Scholes and William adjusted beta / Scholes and William adjusted beta
  • Akaike Information Criterion (AIC)
    • about / Introduction to the Fama-French three-factor model, Durbin-Watson
  • Altman Z-score
    • about / YIELD of AAA-rated bond, Altman Z-score
    • bankruptcy, predicting / Appendix A – data case #8 - predicting bankruptcy by using Z-score
  • American option
    • versus European option / European versus American options
    • right and obligation / Understanding cash flows, types of options, rights and obligations
    • cash flows / Understanding cash flows, types of options, rights and obligations
    • type of options / Understanding cash flows, types of options, rights and obligations
    • binomial tree (CRR) method / Binomial tree (CRR) method for American options
    • about / European, American, and Bermuda options
  • Amihud's illiquidity
    • estimating / Estimating Amihud's illiquidity
  • Anaconda
    • Python, installing through / Installation of Python via Anaconda
  • Annual Percentage Rate (APR) / Introduction to interest rates
    • about / Introducing futures
  • aputtable bond / Bond evaluation
  • ARCH (1) process
    • simulating / Simulating an ARCH (1) process
  • ARCH model
    • about / The ARCH model
  • asset pricing models
    • evaluating / Appendix D – data case #4 – which model is the best, CAPM, FF3, FFC4, or FF5, or others?
  • average options
    • pricing / Pricing average options

B

  • backtesting
    • about / Backtesting and stress testing
  • barrier options
    • pricing, with Monte Carlo Simulation / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation
    • up-and-out / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation, Pricing barrier options
    • down-and-out / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation, Pricing barrier options
    • up-and-in / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation, Pricing barrier options
    • down-and-in / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation, Pricing barrier options
    • pricing / Pricing barrier options
  • Bayesian Information Criterion (BIC)
    • about / Introduction to the Fama-French three-factor model
  • Bermuda option
    • about / European, American, and Bermuda options
  • beta estimation
    • about / References
    • data, downloading / References
    • monthly risk-free rate, downloading / References
  • binary-search
    • about / Binary-search
  • binary file
    • output data, saving to / Saving our data to a binary file
    • output data, reading from / Reading data from a binary file
  • binary option
    • about / Binary options
  • binomial tree (CRR) method
    • about / Binomial tree and its graphic presentation
    • graphic presentation / Binomial tree and its graphic presentation
    • for European option / Binomial tree (CRR) method for European options
    • for American option / Binomial tree (CRR) method for American options
  • Black-Scholes-Merton call
    • replicating, with simulation / Replicating a Black-Scholes-Merton call using simulation
    • Monte Carlo Simulation, used for pricing average / Exotic option #1 – using the Monte Carlo Simulation to price average
  • Black-Scholes-Merton option model
    • on non-dividend paying stocks / Black-Scholes-Merton option model on non-dividend paying stocks
  • bond evaluation / Bond evaluation
  • bondSpread2014.p dataset
    • URL / Credit spread
  • bootstrapping
    • with replacements / With/without replacements
    • without replacements / With/without replacements
  • Breusch-Pangan measure
    • about / Test of heteroskedasticity, Breusch, and Pagan
  • businessCycle.pkl
    • URL / Merging data with different frequencies

C

  • .csv file
    • output data, saving to / Saving our data to a .csv file
  • Canopy
    • Python, installing via / Python via Canopy
    • URL, for downloading / Python via Canopy
  • capital
    • budgeting, with Monte Carlo Simulation / Capital budgeting with Monte Carlo Simulation
  • Capital Asset Pricing Model (CAPM)
    • about / Introduction to CAPM
  • CBOE
    • URL, for data / Put-call parity and its graphic presentation
  • CBOE Volatility Index (VIX)
    • portfolio, hedging / Appendix A – data case 8 - portfolio hedging using VIX calls
    • references / Appendix A – data case 8 - portfolio hedging using VIX calls
  • Center for Research in Security Prices (CRSP)
    • about / Several datasets related to CRSP and Compustat, Introduction to CRSP
    • datasets / Several datasets related to CRSP and Compustat
    • URL / Several datasets related to CRSP and Compustat
    • case study / Appendix C – data case #4 - which political party manages the economy better?
  • chooser option
    • about / Chooser options
  • Citi Group (C) / Optimization – minimization
  • commands, Python module installation for Anaconda
    • conda list / How to install a Python module
    • conda list -n snowflakes / How to install a Python module
    • conda search beautiful-soup / How to install a Python module
    • conda install --name bunnies quant / How to install a Python module
    • conda info / How to install a Python module
  • Compustat
    • datasets / Several datasets related to CRSP and Compustat
  • Consolidated Quote (CQ) dataset
    • URL / Spread estimated based on high-frequency data
  • Consolidated Trade (CT) dataset
    • URL / Python for high-frequency data
  • continuum.io
    • reference / Installation of Python via Anaconda
  • conventional volatility measure
    • estimating / Conventional volatility measure – standard deviation
  • Corporate Bond Yield
    • references / YIELD of AAA-rated bond, Altman Z-score
  • credit default swap (CDS)
    • about / Credit default swap
  • creditRatigs3.pkl dataset
    • URL / Credit rating
  • credit rating
    • about / Credit rating
  • credit ratings agents
    • references / Credit rating
  • credit risk analysis
    • about / Introduction to credit risk analysis
  • credit spread
    • about / Credit spread
  • crude oil, hedging
    • case study / Appendix A – data case 7 – hedging crude oil
    • dataset, URL / Appendix A – data case 7 – hedging crude oil
  • custom financial calculator
    • writing, in Python / Writing your own financial calculator in Python, Appendix G – Writing your own financial calculator in Python
  • custom module p4f
    • generating / Generating our own module p4f

D

  • data
    • input / Data input
    • manipulation / Data manipulation
    • output / Data output
    • retrieving / Diving into deeper concepts
    • retrieving, from Yahoo!Finance / Retrieving data from Yahoo!Finance
    • retrieving, from Google Finance / Retrieving data from Google Finance
    • retrieving, from FRED / Retrieving data from FRED
    • retrieving, from Prof. French 's data library / Retrieving data from Prof. French's data library
    • retrieving, from Census Bureau / Retrieving data from the Census Bureau, Treasury, and BLS
    • retrieving, from Treasury / Retrieving data from the Census Bureau, Treasury, and BLS
    • retrieving, from BLS / Retrieving data from the Census Bureau, Treasury, and BLS
  • datasets
    • merging / How to merge different datasets
    • merging, based on date variable / Merging datasets based on a date variable
    • pandas.date_range() function, used for time-series / Using pandas.date_range() to generate one dimensional time-series
    • returns, estimating / Return estimation
    • daily returns, converting to monthly ones / Converting daily returns to monthly ones
    • merging, by date / Merging datasets by date
  • data types / Data manipulation
  • date variable
    • datasets, merging / Merging datasets based on a date variable
  • default probability
    • URL / Credit rating
  • degree of freedom (F)
    • critical values, generating / Appendix B – critical values of F for the 0.05 significance level
  • delta hedge
    • about / Hedging strategies
  • dictionary / A new data type – dictionary
  • Dimson (1979) adjustment for beta
    • implementation / Implementation of Dimson (1979) adjustment for beta
  • distance to default (DD)
    • about / Distance to default
  • distribution of annual returns
    • estimating / Distribution of annual returns
  • Durbin-Watson
    • about / Durbin-Watson
  • Durbin-Watson test
    • reference / Durbin-Watson
  • dynamic hedging
    • about / Hedging strategies

E

  • economics, Python module
    • reference link / Python modules related to finance
  • Effective Annual Rate (EAR) / Introduction to interest rates
  • efficient frontier
    • constructing, with n stocks / Constructing an efficient frontier with n stocks, Constructing an efficient frontier with n stocks
    • generating, based on two stocks with simulation / Finding an efficient frontier based on two stocks by using simulation
  • empty space / Variable assignment, empty space, and writing our own programs
  • equal-weighted market index (EWRETD) / Appendix C – data case #4 - which political party manages the economy better?
  • equal variances
    • testing / Tests of equal variances
  • European option
    • versus American option / European versus American options
    • cash flows / Understanding cash flows, types of options, rights and obligations
    • type of options / Understanding cash flows, types of options, rights and obligations
    • right and obligation / Understanding cash flows, types of options, rights and obligations
    • with known dividends / European options with known dividends
    • binomial tree (CRR) method / Binomial tree (CRR) method for European options
    • about / European, American, and Bermuda options
  • Excel file
    • output data, saving to / Saving our data to an Excel file
  • Expected shortfall (ES)
    • about / Expected shortfall

F

  • F-test
    • about / T-test and F-test
  • Fama-French-Carhart four-factor model
    • about / Fama-French-Carhart four-factor model and Fama-French five-factor model
  • Fama-French five-factor model
    • about / Fama-French-Carhart four-factor model and Fama-French five-factor model
  • Fama-French monthly dataset
    • URL / Fama-French three-factor model
  • Fama-French three-factor model
    • about / Introduction to the Fama-French three-factor model, Fama-French three-factor model
  • Fama-MacBeth regression
    • about / Fama-MacBeth regression
  • fat tails
    • estimating / Estimating fat tails
    • reference / Estimating fat tails
  • Federal Reserve Economics Data (FRED)
    • about / Introduction to the pandas_reader module
  • ffDaily.pkl dataset
    • URL / Lower partial standard deviation and Sortino ratio
  • ffMonthly.pkl dataset
    • reference / Data input
    • generating / Appendix B – Python program to generate ffMonthly.pkl
  • ffMonthly.pkl datasets
    • URL / How to merge different datasets, Introduction to time-series analysis
  • ffMonthly5.pkl dataset
    • URL / Fama-French-Carhart four-factor model and Fama-French five-factor model
  • ffMonthly dataset
    • URL / Merging data with different frequencies
  • fGarch package
    • URL / Simulating a GARCH (p,q) process using modified garchSim()
  • finance
    • Python module, used / Python modules related to finance
  • financial calculator
    • writing, in Python / Writing a financial calculator in Python
    • downloading / Appendix D – How to download a free financial calculat
  • financial calculators
    • about / Two financial calculators
  • fincal.cpython-35.syc
    • URL, for downloading / Two financial calculators
  • floating strikes
    • lookback options, pricing with / Pricing lookback options with floating strikes
  • French Data library
    • URL / References
  • Frenchs Data Library
    • data, URL / Appendix A – data case #5 - which industry portfolio do you prefer?
  • functions
    • using / Two general formulae for many functions
    • pv() / Two general formulae for many functions
    • fv() / Two general formulae for many functions
    • nper() / Two general formulae for many functions
    • pmt() / Two general formulae for many functions
    • rate() / Two general formulae for many functions
  • futures
    • about / Introducing futures

G

  • GARCH (p,q) process
    • simulating, with modified garchSim() function / Simulating a GARCH (p,q) process using modified garchSim()
  • GARCH process
    • simulating / Simulating a GARCH process
  • GDP dataset usGDPquarterly2.pkl
    • generating, with Python / Appendix A – Python program to generate GDP dataset usGDPquarterly2.pkl
  • Generalized AutoRegressive Conditional Heteroskedasticity (GARCH) / The GARCH model
  • GJR_GARCH
    • about / GJR_GARCH by Glosten, Jagannanthan, and Runkle
  • Greeks
    • Delta / Greeks
    • Gamma / Greeks
    • Theta / Greeks
    • Vega / Greeks
    • Rho / Greeks
  • Gross Domestic Product (GDP)
    • about / Introduction to time-series analysis
    / Merging data with different frequencies

H

  • hedging strategies
    • about / Hedging strategies
  • heteroskedasticity
    • testing / Test of heteroskedasticity, Breusch, and Pagan
  • high-frequency data
    • with Python / Python for high-frequency data
    • spread, estimating / Spread estimated based on high-frequency data
  • High Minus Low (HML)
    • about / Fama-French three-factor model
    / Selecting m stocks randomly from n given stocks
  • histogram
    • for normal distribution / Histogram for a normal distribution
  • historical price data
    • URL / Introduction to CAPM

I

  • implied volatility
    • estimating / Implied volatility
  • in-and-out parity, barrier options
    • about / Barrier in-and-out parity
  • industry portfolio
    • preferences, determining / Appendix A – data case #5 - which industry portfolio do you prefer?
  • installation
    • Python / Python installation
    • of Python, via Anaconda / Installation of Python via Anaconda
  • interest rate
    • term structure / Term structure of interest rate
  • interest rates
    • about / Introduction to interest rates
    • term structure / Term structure of interest rates
  • Internal Rate of Return (IRR)
    • about / Definition of IRR and IRR rule
    • graphical presentation, in relationship with NPV profile / Appendix F – graphical presentation of NPV profile with two IRRs
    / Term structure of interest rates
  • International Business Machine (IBM) / Optimization – minimization
  • International Business Machine Corporation (IBM) / Appendix F – data case #2 – fund raised from a new bond issue
  • International Rate of Return (IRR) / Bond evaluation
  • interpolation
    • about / Understanding the interpolation technique
    • data, merging with different frequencies / Merging data with different frequencies
  • intra-day high-frequency data
    • URL / Python for high-frequency data
  • IRR rule
    • about / Definition of IRR and IRR rule

J

  • January effect
    • testing / Testing the January effect

K

  • KMV model
    • used, for estimating market value of total assets / Using the KMV model to estimate the market value of total assets and its volatility
    • used, for estimating volatility / Using the KMV model to estimate the market value of total assets and its volatility
  • kurtosis
    • about / Skewness and kurtosis

L

  • lognormal distribution
    • graphical presentation / Graphical presentation of a lognormal distribution
  • long-term return forecast
    • estimating / Long-term return forecasting
  • lookback options
    • pricing, with floating strikes / Pricing lookback options with floating strikes
  • Loss given default (LGD) / Credit rating
  • lower partial standard deviation
    • about / Lower partial standard deviation and Sortino ratio
  • Lower Partial Standard Deviation (LPSD)
    • about / Performance measures, Constructing an efficient frontier with n stocks

M

  • Markowitz Portfolio Optimization
    • about / Introduction to portfolio theory
  • matplotlib
    • about / Introduction to matplotlib
    • installing / How to install matplotlib
    • using, for graphical presentations / Several graphical presentations using matplotlib
  • migration1year.pkl dataset
    • URL / Credit rating
  • migration5year.pkl dataset
    • URL / Credit rating
  • modified garchSim() function
    • GARCH (p,q) process, simulating with / Simulating a GARCH (p,q) process using modified garchSim()
  • modified VaR
    • about / Modified VaR
  • Monte Carlo Simulation
    • about / Importance of Monte Carlo Simulation
    • used, for pricing average / Exotic option #1 – using the Monte Carlo Simulation to price average
    • barrier options, pricing / Exotic option #2 – pricing barrier options using the Monte Carlo Simulation
    • capital, budgeting / Capital budgeting with Monte Carlo Simulation
    • data case / Appendix A – data case #8 - Monte Carlo Simulation and blackjack
  • Monte Carlo simulation
    • about / Simulation and VaR
    • efficiency / Efficiency, Quasi-Monte Carlo, and Sobol sequences
  • moving beta
    • about / Moving beta

N

  • n-stock portfolio
    • forming / Forming an n-stock portfolio
  • National Association of Insurance Commissioners (NAIC)
    • about / Credit rating
  • Net Present Value (NPV) / Python loops, if...else conditions
    • about / Definition of NPV and NPV rule, Importance of Monte Carlo Simulation
    • graphical presentation, in relationship with R / Appendix E – The graphical presentation of the relationship between NPV and R
  • normal distribution
    • random numbers, generating / Generating random numbers from a standard normal distribution
    • random samples, drawing / Drawing random samples from a normal distribution
    • random numbers, generating from / Random numbers from a normal distribution
    • histogram / Histogram for a normal distribution
  • normality tests
    • about / Tests of normality, Tests of normality
    • fat tails, estimating / Estimating fat tails
    • T-test / T-test and F-test
    • F-test / T-test and F-test
    • equal variances, testing / Tests of equal variances
    • January effect, testing / Testing the January effect
  • Normality tests
    • about / Normality tests
  • NPV profile
    • graphical presentation, in relationship with IRR / Appendix F – graphical presentation of NPV profile with two IRRs
  • NPV rule
    • about / Definition of NPV and NPV rule
  • NumPy
    • about / Introduction to NumPy
    • installation / Appendix A – Installation of Python, NumPy, and SciPy

O

  • objective function
    • minimizing / Optimization – minimization
  • one dimensional time-series
    • generating, with pandas.date_range() function / Using pandas.date_range() to generate one dimensional time-series
  • optimal portfolio
    • constructing / Constructing an optimal portfolio
  • ordinary least square (OLS)
    • about / Introduction to statsmodels
  • Ordinary Least Squares (OLS)
    • about / Introduction to the Fama-French three-factor model
  • output data
    • extracting / Extracting output data
    • extracting, to text files / Outputting data to text files
    • saving, to .csv file / Saving our data to a .csv file
    • saving, to Excel file / Saving our data to an Excel file
    • saving, to pickle dataset / Saving our data to a pickle dataset
    • saving, to binary file / Saving our data to a binary file
    • reading, from binary file / Reading data from a binary file

P

  • .pickle dataset
    • URL / Volatility smile and skewness
  • pandas.date_range() function
    • used, for generating one dimensional time-series / Using pandas.date_range() to generate one dimensional time-series
  • pandas module
    • about / Introduction to pandas
  • pandas_reader module
    • about / Introduction to the pandas_reader module
  • Pastor and Stambaugh (2003) liquidity measure
    • estimating / Estimating Pastor and Stambaugh (2003) liquidity measure
  • payback period
    • about / Definition of payback period and payback period rule
  • payback period rule
    • about / Definition of payback period and payback period rule
  • payoff function
    • for put option / Payoff and profit/loss functions for call and put options
    • for call option / Payoff and profit/loss functions for call and put options
  • performance measures
    • about / Performance measures
  • pickle dataset
    • output data, saving to / Saving our data to a pickle dataset
  • pi value
    • estimating, with simulation / Using simulation to estimate the pi value
  • Poisson distribution
    • random numbers, generating from / Generating random numbers from a Poisson distribution
  • portfolio
    • hedging, with CBOE Volatility Index (VIX) calls / Appendix A – data case 8 - portfolio hedging using VIX calls
  • portfolio insurance
    • about / Appendix A – data case 6: portfolio insurance
    • data case / Appendix A – data case 6: portfolio insurance
  • portfolio theory
    • about / Introduction to portfolio theory
  • present value (pv)
    • about / Two general formulae for many functions
    • deriving / Appendix C – Derivation of present value of annuity from present value of one future cash flow and present value of perpetuity
  • Probability of informed (PIN)
    • about / Generating random numbers from a Poisson distribution
  • profit/loss functions
    • for call option / Payoff and profit/loss functions for call and put options
    • for put option / Payoff and profit/loss functions for call and put options
  • programs
    • writing / Variable assignment, empty space, and writing our own programs
  • put-call parity
    • about / Put-call parity and its graphic presentation
    • graphic presentation / Put-call parity and its graphic presentation
    • put-call ratio, with trend for short period / The put-call ratio for a short period with a trend
  • put call ratio
    • URL / Put-call parity and its graphic presentation
  • Python
    • installation / Python installation, Appendix A – Installation of Python, NumPy, and SciPy
    • installation, via Anaconda / Installation of Python via Anaconda
    • launching, via Spyder / Launching Python via Spyder
    • direct installation / Direct installation of Python
    • reference / Direct installation of Python
    • URL, for tutorial / What is a Python module?
    • financial calculator, writing in / Writing a financial calculator in Python
    • custom financial calculator, writing / Writing your own financial calculator in Python, Appendix G – Writing your own financial calculator in Python
    • URL / Appendix A – Installation of Python, NumPy, and SciPy
    • installing, via Canopy / Python via Canopy
    • used, for high-frequency data / Python for high-frequency data
    • GDP dataset usGDPquarterly2.pkl, generating / Appendix A – Python program to generate GDP dataset usGDPquarterly2.pkl
  • Python dataset
    • reference / Appendix F – data case #2 – fund raised from a new bond issue
  • Python datasets
    • URL / Appendix A – list of related Python datasets
    • ibm3factor.pkl / Appendix A – list of related Python datasets
    • ffMonthly.pkl / Appendix A – list of related Python datasets
    • ffMomMonthly.pkl / Appendix A – list of related Python datasets
    • ffcMonthly.pkl / Appendix A – list of related Python datasets
    • ffMonthly5.pkl / Appendix A – list of related Python datasets
    • yanMonthly.pkl / Appendix A – list of related Python datasets
    • ffDaily.pkl / Appendix A – list of related Python datasets
    • ffcDaily.pkl / Appendix A – list of related Python datasets
    • ffDaily5.pkl / Appendix A – list of related Python datasets
    • usGDPquarterly.pkl / Appendix A – list of related Python datasets
    • usDebt.pkl / Appendix A – list of related Python datasets
    • usCPImonthly.pkl / Appendix A – list of related Python datasets
    • tradingDaysMonthly.pkl / Appendix A – list of related Python datasets
    • tradingDaysDaily.pkl / Appendix A – list of related Python datasets
    • businessCycleIndicator.pkl / Appendix A – list of related Python datasets
    • businessCycleIndicator2.pkl / Appendix A – list of related Python datasets
    • uniqueWordsBible.pkl / Appendix A – list of related Python datasets
  • Python function
    • writing / Writing a Python function
  • Python loops
    • about / Python loops
    • if...else conditions / Python loops, if...else conditions
  • Python module
    • about / What is a Python module?
    • related to finance / Python modules related to finance
    • installing / How to install a Python module
    • dependency / Module dependency
    • advantages / Module dependency
    • disadvantages / Module dependency
  • Python module, in finance
    • Numpy.lib.financial / Python modules related to finance
    • pandas_datareader / Python modules related to finance
    • googlefinance / Python modules related to finance
    • yahoo-finance / Python modules related to finance
    • Python_finance / Python modules related to finance
    • tstockquote / Python modules related to finance
    • finance / Python modules related to finance
    • quant / Python modules related to finance
    • tradingmachine / Python modules related to finance
    • economics / Python modules related to finance
    • FinDates / Python modules related to finance
  • Python module, installation for Anaconda
    • reference link / How to install a Python module
  • Python Module Index (v2.7)
    • reference link / Python modules related to finance
  • Python Module Index (v3.5)
    • reference link / Python modules related to finance
  • Python Package Index (PyPI)
    • reference link / Python modules related to finance
  • Python Packaging Index (PIP)
    • about / Appendix A – Installation of Python, NumPy, and SciPy
  • Python program
    • return distribution, versus normal distribution / Appendix A – Python program for return distribution versus a normal distribution
    • candle-stick picture, drawing / Appendix B – Python program to a draw candle-stick picture
    • for price movement / Appendix C – Python program for price movement
    • for displaying stock's intra-day movement / Appendix D – Python program to show a picture of a stock's intra-day movement
    • pandas DataFrame, properties / Appendix E –properties for a pandas DataFrame
    • Python dataset with .pkl extension, generating / Appendix F –how to generate a Python dataset with an extension of .pkl or .pickle
    • Python dataset with .pickle extension, generating / Appendix F –how to generate a Python dataset with an extension of .pkl or .pickle
    • several Python datasets, generating / Appendix G – data case #1 -generating several Python datasets
    • for rateYan.py / Appendix A – simple interest rate versus compounding interest rate
    • for interest conversion / Appendix A – simple interest rate versus compounding interest rate
    • for stock price based n-period model estimation / Appendix D – Python program to estimate stock price based on an n-period model
    • for bond duration estimation / Appendix F – data case #2 – fund raised from a new bond issue
  • Python SimPy module
    • about / Python SimPy module

Q

  • Quasi Monte Carlo
    • about / Efficiency, Quasi-Monte Carlo, and Sobol sequences

R

  • R
    • graphical presentation, in relationship with NPV / Appendix E – The graphical presentation of the relationship between NPV and R
  • rainbow options
    • about / Rainbow options
  • random numbers
    • generating, from normal distribution / Generating random numbers from a standard normal distribution, Random numbers from a normal distribution
    • generating, with seed / Generating random numbers with a seed
    • histogram, for normal distribution / Histogram for a normal distribution
    • lognormal distribution, graphical presentation / Graphical presentation of a lognormal distribution
    • generating, from uniform distribution / Generating random numbers from a uniform distribution
    • generating, from Poisson distribution / Generating random numbers from a Poisson distribution
  • recovery rates
    • reference / Credit rating
  • risk-free rate / Term structure of interest rate
  • risk-free rate (Rf)
    • about / Performance measures, Constructing an efficient frontier with n stocks
  • Roll's spread
    • estimating / Estimating Roll's spread
  • Root Mean Standard Square Error (RMSE)
    • about / Introduction to the Fama-French three-factor model

S

  • 2-Step Approach / Introduction to interest rates
  • 2-stock portfolio
    • about / A 2-stock portfolio
  • S&P500 Index (SPX) / Appendix A – data case 8 - portfolio hedging using VIX calls
  • S&P500 monthly returns
    • replicating / Appendix B – data case #6 - replicate S
  • Scholes and William adjusted beta
    • about / Scholes and William adjusted beta
  • SciPy
    • about / Introduction to SciPy
    • installation / Appendix A – Installation of Python, NumPy, and SciPy
  • scipy.optimize.minimize() function
    • NelderMead / Optimization – minimization
    • Powell / Optimization – minimization
    • CG / Optimization – minimization
    • BFGS / Optimization – minimization
    • NewtonCG / Optimization – minimization
    • LBFGSB / Optimization – minimization
    • TNC / Optimization – minimization
    • COBYLA / Optimization – minimization
    • SLSQP / Optimization – minimization
    • trustncg / Optimization – minimization
    • dogleg / Optimization – minimization
  • seed
    • random numbers, generating / Generating random numbers with a seed
  • Shapiro-Wilk test / Tests of normality
  • shout option
    • about / Shout options
  • simple interest rate
    • versus compounding interest rate / Appendix A – simple interest rate versus compounding interest rate
  • SimPy
    • about / Python SimPy module
  • simulation
    • pi value, estimating with / Using simulation to estimate the pi value
    • Black-Scholes-Merton call, replicating with / Replicating a Black-Scholes-Merton call using simulation
    • methods, liking for VaR / Liking two methods for VaR using simulation
    • used, for obtaining efficient frontier based on stocks / Finding an efficient frontier based on two stocks by using simulation
  • skewness
    • volatility smile / Volatility smile and skewness
    • about / Skewness and kurtosis
  • Small Minus Big (SMB)
    • about / Fama-French three-factor model
    / Selecting m stocks randomly from n given stocks
  • Sobol sequence
    • about / Efficiency, Quasi-Monte Carlo, and Sobol sequences
  • social policies, comparison
    • example / Comparison between two social policies – basic income and basic job
  • Sortino ratio
    • about / Lower partial standard deviation and Sortino ratio
  • Spyder
    • Python, launching through / Launching Python via Spyder
    • Python, launching via / Launching Python via Spyder
  • statsmodels
    • about / Introduction to statsmodels
  • stock price movements
    • simulation / Simulation of stock price movements
  • stock prices
    • graphical presentation, at options maturity dates / Graphical presentation of stock prices at options' maturity dates
  • stocks
    • selecting, randomly from given stocks / Selecting m stocks randomly from n given stocks
  • stock valuation / Stock valuation
  • stress testing
    • about / Backtesting and stress testing
  • strftime
    • URL / Using pandas.date_range() to generate one dimensional time-series
  • string manipulation
    • about / Simple string manipulation

T

  • T-test
    • about / T-test and F-test
  • text files
    • output data, extracting to / Outputting data to text files
  • time-series analysis
    • about / Introduction to time-series analysis
  • time value of money
    • about / Introduction to time value of money
    • visual presentation / Appendix B – visual presentation of time value of money
  • Trade, Order, Report, and Quotation (TORQ) database
    • about / Python for high-frequency data
    • URL / Python for high-frequency data
  • Trade and Quotation (TAQ) database
    • URL / Python for high-frequency data
  • trading strategies
    • about / Various trading strategies
    • covered-call / Covered-call – long a stock and short a call
    • scenario / Straddle – buy a call and a put with the same exercise prices
    • butterfly, with calls / Butterfly with calls
    • input values and option values, relationship between / The relationship between input values and option values
    • Greeks / Greeks
  • two dozen datasets
    • generating / Generating two dozen datasets

U

  • uniform distribution
    • random numbers, generating / Generating random numbers from a uniform distribution
  • uniqueWordsBible.pkl file
    • URL / Simple string manipulation
  • up-and-in parity, barrier options
    • graph / Graph of up-and-out and up-and-in parity
  • up-and-out parity, barrier options
    • graph / Graph of up-and-out and up-and-in parity

V

  • value-weighted market returns (VWRETD) / Appendix C – data case #4 - which political party manages the economy better?
  • Value at Risk (VaR)
    • about / Introduction to VaR
    • estimation / Simulation and VaR
    • for portfolios / VaR for portfolios
    • estimation, case study / Appendix A – data case 7 – VaR estimation for individual stocks and a portfolio
  • VaR
    • methods, liking with simulation / Liking two methods for VaR using simulation
  • VaR based on historical returns
    • about / VaR based on sorted historical returns
  • variable assignment / Variable assignment, empty space, and writing our own programs
  • volatility
    • equivalency, testing over two periods / Test of equivalency of volatility over two periods
  • volatility clustering
    • graphical presentation / Graphical presentation of volatility clustering
  • volatility skewness
    • about / Volatility smile and skewness
  • volatility smile
    • skewness / Volatility smile and skewness
    • about / Volatility smile and skewness
    • implications / Appendix B – data case 8 - volatility smile and its implications

W

  • 52-week high and low trading strategy
    • about / 52-week high and low trading strategy
  • Walmart (WMT) / Optimization – minimization
    • about / Modified VaR

Y

  • Yahoo!Finance
    • reference / Data input, Term structure of interest rates
  • Yahoo! Finance
    • URL, for dataset / Introduction to the Fama-French three-factor model, Appendix B – data case 8 - volatility smile and its implications
    • option data, retrieving / Retrieving option data from Yahoo! Finance
    • URL / Retrieving option data from Yahoo! Finance, Volatility smile and skewness
  • Yahoo! Finance bond
    • URL / Understanding the interpolation technique
  • Yahoo Finance
    • URL / References
  • yanMonthly.pkl dataset
    • URL / Scholes and William adjusted beta, Forming an n-stock portfolio, Constructing an efficient frontier with n stocks, Selecting m stocks randomly from n given stocks
  • Yield to Maturity (YTM) / Term structure of interest rates, Bond evaluation
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images