Giter VIP home page Giter VIP logo

Comments (7)

francisg77 avatar francisg77 commented on July 19, 2024

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.

zoeyzhougs avatar zoeyzhougs commented on July 19, 2024

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.

zoeyzhougs avatar zoeyzhougs commented on July 19, 2024

renaming r_square to r_squared

from gs-quant.

Atharva-Peshkar avatar Atharva-Peshkar commented on July 19, 2024

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.

andrewphillipsn avatar andrewphillipsn commented on July 19, 2024

@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.

Atharva-Peshkar avatar Atharva-Peshkar commented on July 19, 2024

@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.

sirinath avatar sirinath commented on July 19, 2024

It might be an idea to open source plot tools.

from gs-quant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.