Comments (7)
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?
from gs-quant.
Agreed on the namings.
For now it's hard to use the predict function as we don't have functions to easily split data into train and test subsets. One example that needs improve:
spx = returns(SPX.spot(), simple)
spx_vol = diff(SPX.implied_volatility(1m, forward, 100), 1)
spx_train = interpolate(spx, [2020-02-01, 2020-02-02, 2020-02-03])
spx_vol_train = interpolate(spx_vol, [2020-02-01, 2020-02-02, 2020-02-03])
spx_test = interpolate(spx, [2020-02-04, 2020-02-05])
r = LinearRegression([spx_train], spx_vol_train)
r.predict(spx_test)
from gs-quant.
renaming r_square
to r_squared
from gs-quant.
Agreed on the namings.
For now it's hard to use the predict function as we don't have functions to easily split data into train and test subsets. One example that needs improve:spx = returns(SPX.spot(), simple)
spx_vol = diff(SPX.implied_volatility(1m, forward, 100), 1)
spx_train = interpolate(spx, [2020-02-01, 2020-02-02, 2020-02-03])
spx_vol_train = interpolate(spx_vol, [2020-02-01, 2020-02-02, 2020-02-03])
spx_test = interpolate(spx, [2020-02-04, 2020-02-05])
r = LinearRegression([spx_train], spx_vol_train)
r.predict(spx_test)
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.
from gs-quant.
@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
from gs-quant.
@andyphillipsgs Yeah! sure I'd be glad to contribute.
@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
from gs-quant.
It might be an idea to open source plot tools.
from gs-quant.
Related Issues (20)
- IRSwap does not round trip. IRSwap.from_dict(swap.as_dict()) throws type error
- RiskMeasure - how to check for equality : RiskMeasure.from_dict(IRFwdRate.as_dict()) == IRFwdRate returns False HOT 1
- Is there a Documentation for this library i can refer to for its usage HOT 1
- Remove pandas version restriction HOT 4
- Add support for pagination or scrolling in `Dataset.get_data` HOT 3
- [BUG] ModuleNotFoundError in Dataset.get_coverage HOT 1
- [BUG] broken link in README HOT 4
- [BUG] `Dataset.get_data` fails with string `start_time`/`end_time`
- statsmodels upgrade HOT 3
- Unable to roundtrip Portfolio.to_csv -> Portfolio.from_csv
- [BUG] gs_quant python entity Country not working HOT 2
- [BUG] fields argument in Dataset.get_data makes non-selected columns NaN but all columns still present in DataFrame
- [BUG] Dataset date handling is broken with dataclasses-json version 0.6.5 dependency, gives ValueError: Cannot convert 2024-04-29 to date HOT 2
- Vol structure HOT 3
- WIP: Backtest Module HOT 1
- repeat() function HOT 6
- [BUG] The variable name for creating instruments is wrong. HOT 1
- [BUG] HOT 2
- PricingContext._handle_results incorrectly removes unfetched Futures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gs-quant.