Code Monkey home page Code Monkey logo

Comments (12)

Kogelet avatar Kogelet commented on August 11, 2024 16

Thumbs up for shorting feature.

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024 6

Update on the shorting branch: Shorting feature is almost ready in its core, some final touches are left. It will work similar to how it's implemented in backtrader: size > 0 means long, size < 0 means short. On top of that, np.inf means buying for all cash, -np.inf means borrowing the amount that can be covered by current portfolio value. One can still borrow more than that by providing a finite number. There won't be any limits or forced short cover though (portfolio value just turns negative). Target sizes all work as expected. I think this builds a great backbone that can be further extended by custom portfolio functions. If there is any other shorting related feature or idea drop it here.

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024 6

Implemented in 0.15.0. Refer to Portfolio docs for details. Basically there is a keyword argument direction that defaults to longonly for signals and all for orders and custom order function. Defaults can be changed in vectorbt.settings. There are tons of other features as well that I tried to fit into the release, that's why it lasted a bit longer, but it was worth it.

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024 3

Hi @erwan-rouzel, I'm up to finish iterative signal factory this week and then start implementing shorting. Can't give any estimates right now.

from vectorbt.

erwan-rouzel avatar erwan-rouzel commented on August 11, 2024 1

Cool! Good news. Looking forward for it.

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024

Hi, that’s a great suggestion, shorting is definitely something to work on in the future. Right now we are more focused on writing the project documentation, I think that’s something everyone would love to have. After this, we will continue working on new features.

from vectorbt.

MislavSag avatar MislavSag commented on August 11, 2024

do you have prerelease version of documentaion?

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024

You can find some basic API reference under https://polakowo.io/vectorbt/docs/index.html

In few days I will release the version 0.6 and the complete API reference.

from vectorbt.

erwan-rouzel avatar erwan-rouzel commented on August 11, 2024

Hi @polakowo, any rough idea when the shorting feature could be released? That would be really great to have it!

from vectorbt.

fcojaviergl avatar fcojaviergl commented on August 11, 2024

Thank!!! It is a very good news!!!

from vectorbt.

wyczolko avatar wyczolko commented on August 11, 2024

Can you provide a brief example of long/short implementation from basic signal entries

from vectorbt.

polakowo avatar polakowo commented on August 11, 2024

@wyczolko see examples under Portfolio.from_signals. Feel free to ask questions on Gitter.

from vectorbt.

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.