Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Computational Finance using R and Python

Dr. Pradiptarathi Panda


Assistant Professor
National Institute of Securities Markets (NISM), Navi Maumbai
Established by SEBI
Objective of the course
➢This course aims at providing an introduction to the computational issues
in financial problems.
➢ The focus is on an understanding of the concepts and tools in
computational techniques with R and Python.
➢ In addition, the course introduces numerical techniques for valuation,
pricing and hedging of financial investment instruments such as fixed
income securities and options.
➢Students Understand basics of R and Python which will help to Develop
data analysis skills
Course Outline
Module1: Introduction to R
➢ Communication with R, R software, R interfaces, R syntax, R code, R help, R packages, basic operations in R-
vectors, matrices and lists in R, vector algebra, matrix algebra, computing asset returns-- Functions in R
Creating functions, calling functions, computing yields, bisection method, Newton-Raphson method,
computing price volatility –Data visualization/ Graphics in R -Ggplot, spot rates, extracting spot rates from
yield curves, spot rate curve and yield curve.

Module 2: Data Frames in R


➢ Organizing values into data frames, loading frames from files and merging them, working with real-world data-
testing for correlation between data sets, linear models and installing additional packages, Basic R statistics,
Covariance, correlation, autocorrelation, linear combinations of random variables, descriptive statistics-
histograms, sample means, variances, co-variances and autocorrelations, Stock Prices, Individual stock
returns and Portfolio returns, Technical analysis using R (SMA, Bolinger band, RSI).
• Module 3: Introduction to Python
• Python Programming Basics- Data Types, Anaconda Installation, Jupyter
Notebook, Spyder, numpy, Pandas, Dictionaries, Reading and Writing Data: Text
files, Subsetting the data, Graphics with matplotlib and seaborn. Machine
Learning Algorithms (Using Scikit-Learn)- Introduction to Machine Learning,
Linear & Logistic Regression Options, K-Nearest Neighbour Algorithm, Decision
Trees
• Module 4: Basic R probability
• Univariate random variables and distributions, characteristics of distributions, the
normal distribution, linear function of random variables, quantiles of a
distribution, value-at-risk

• Module 5: Computational Finance: Basic Financial Mathematics:


• Time Value of Money, Annuities, Amortization, Yields, Bonds, Bond Price
Volatility.
• Module 6: Computational Methods for Fixed Income Securities:
• Price Volatility, Duration, Convexity, Term Structure of Interest Rates, Introduction, Spot Rates,
Extracting Spot Rates from Yield Curves, Static Spread, Spot Rate Curve and Yield Curve, Forward
Rates, Term Structure Theories.

• Module 7: Computational Methods for Option Pricing:


• Basics, Exchange-Traded Options, Basic Option Strategies, The Binomial Option Pricing Model, The
Black–Scholes Formula, Using the Black–Scholes Formula, American puts on a Non-Dividend-Paying
Stock, Options on a Stock that Pays Dividends, Traversing the Tree Diagonally, Sensitivity Analysis of
Options, Sensitivity Measures (“The Greeks”).
• Module 8: Numerical Methods for Finance:
• Numerical Methods for Finance, Numerical Differentiation and Greeks Partial Differential Equations
− Weighted Monte Carlo Optimization/Calibration − Fourier Methods – Laplace Inversion − Finite
Difference Methods − Mathematical Design Patterns – Stochastic Volatility.
Reading List:

➢ Dalgaard, P. (2008). Introductory statistics with R. Springer.


➢ Lyuu, Y. D. (2002). Financial Engineering and Computation. Cambridge Books.
➢ Zuur, A., Ieno, E. N., & Meesters, E. (2009). A Beginner's Guide to R. Springer Science & Business
Media.
➢ Teetor, P. (2011). R cookbook: Proven recipes for data analysis, statistics, and graphics. " O'Reilly
Media, Inc.".
➢ Ang, C. S. (2015). Analyzing financial data and implementing financial models using R. Springer.
➢ Lander, J. P. (2014). R for everyone: advanced analytics and graphics. Pearson Education.
➢ Daróczi, G., Puhle, M., Berlinger, E., Csóka, P., Havran, D., Michaletzky, M., ... & Vidovics-Dancs, A.
(2013). Introduction to R for Quantitative Finance. Packt Publishing Ltd
➢ McKinney, W. (2012). Python for data analysis: Data wrangling with Pandas, NumPy, and IPython. "
O'Reilly Media, Inc.".
➢ Hilpisch, Y. (2014). Python for Finance: Analyze big financial data. " O'Reilly Media, Inc.".
➢ Hull, John C. (2005), Options, Futures and other Derivatives and Finance, 6th Ed., Prentice hall.
➢ Ross, Sheldon M. (1999), An Elementary Introduction to Mathematical Finance, Cambridge Press.
“In God we trust, all others must bring data”
• - W Edwards Deming

8/22/2021 Data collection adn Distribuition 7


Data & Information
Data
Information

8/22/2021 Data collection adn Distribuition 8


8/22/2021 Data collection adn Distribuition 9
8/22/2021 Introduction to Financial Institutions and Markets 10
George A. Akerlof-2001 Nobel Prize
The Market for Lemons 1970. “The Market for
‘Lemons’”: Quality
Uncertainty and the
Market Mechanism.”
Quarterly Journal of
Economics 84: 353–374.

8/22/2021 Introduction to Financial Institutions and Markets 11


Thank You

You might also like