Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Python for Finance
  • Table Of Contents Toc
  • Feedback & Rating feedback
Python for Finance

Python for Finance

By : Yuxing Yan
3.9 (22)
close
close
Python for Finance

Python for Finance

3.9 (22)
By: Yuxing Yan

Overview of this book

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. 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 knowledge of Python will be helpful but knowledge of programming is necessary.
Table of Contents (14 chapters)
close
close
13
Index

Test of heteroskedasticity, Breusch, and Pagan (1979)

Breusch and Pagan (1979) designed a test to confirm or reject the null assumption that the residuals from a regression is homogeneous, that is, with a constant volatility. The following formula represents their logic. First, we run a linear regression of y against x:

Test of heteroskedasticity, Breusch, and Pagan (1979)

Here, y is the independent variable, x is the independent variable, α is the intercept, β is the coefficient and Test of heteroskedasticity, Breusch, and Pagan (1979) is an error term. After we get the error term (residual), we run the second regression:

Test of heteroskedasticity, Breusch, and Pagan (1979)

Assume that the fitted values from running the previous regression is Test of heteroskedasticity, Breusch, and Pagan (1979) , then the Breusch-Pangan (1979) measure is given as follows, and it follows a χ2 distribution with a k degree of freedom:

Test of heteroskedasticity, Breusch, and Pagan (1979)

The following example is borrowed from an R package called lm.test (test linear regression), and its authors are Hothorn et al. (2014). We generate a time series of x, y1 and y2. The independent variable is x, and the dependent variables are y1 and y2. By our design,...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY