-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in PlotToolPro #94
Comments
Looks good to me, should we do r_square and t_stat just to be consistent with other methods. what does an example with predict look like? |
Agreed on the namings.
|
renaming |
I'm a student and have been working in ML for a while now. I'm a new contributor here. We could use the train_test_split function from sklearn library for easily splitting the training and test datasets. It'll help with the predict function. I would've done it but am not able to find PlotToolPro. |
@Atharva-Peshkar thanks for the input. we can run an example which is pure python, you don't need access to the PlotTool Pro application as the functions being discussed are exposed in the timeseries module in GS Quant. Give us a shout if you are keen to extend and we can give some guidance and add a tutorial |
@andyphillipsgs Yeah! sure I'd be glad to contribute.
|
It might be an idea to open source plot tools. |
Describe the problem.
Regression should be available in PlotToolPro.
Describe the solution you'd like
Add a class in gs-quant (constructor in PlotToolPro) for the model fitting which has methods to get model parameters and perform prediction.
For example, linear regression should take the form
LinearRegression(X, y, w)
where X denotes explanatory variables [x1, x2, x3, ...], y is the dependent variable and w is the moving window. The class has methods:coefficient(i)
- the i-th coefficientrsquare()
- model R squaredtstat(i)
- t-stat of the i-th coefficientfitted_values()
- fitted valuespredict(X')
where X' is the test set of explanatory variables - predicated values (Note: if multiple regression models have been fitted over the moving window, the most recent model will be used for prediction)In PlotToolPro, users could fit a linear regression between changes of implied volatility of S&P 500 index and returns on the underlying by:
Are you willing to contribute
Yes
The text was updated successfully, but these errors were encountered: