Code Monkey home page Code Monkey logo

Comments (7)

glide1178 avatar glide1178 commented on July 16, 2024

Hey, I was wondering the same thing about weighting. Premium is your cost per trade. It skims the amount off your balance before every buy, and after every sell.

from trady.

chillydk147 avatar chillydk147 commented on July 16, 2024

Hi thanks for the response, so the premium value is the cost per transaction, if that's the case then why when I look at the first transaction object does the "AbsoluteCashFlow" property have a value equal to 9999.43560, should it not be 9999. The candle for this buy transaction opened at 1.24840

var tx = result.Transactions;

from trady.

glide1178 avatar glide1178 commented on July 16, 2024

Maybe set some breakpoints in the BuyAsset and SellAsset methods, and you'll get your answer.

from trady.

chillydk147 avatar chillydk147 commented on July 16, 2024

Thanks but how do I do that?, I just have a single line of code which runs the backtest

Trady.Analysis.Backtest.Result result = runner.Run(10000, 1);

from trady.

glide1178 avatar glide1178 commented on July 16, 2024

Download the code.

from trady.

karlwancl avatar karlwancl commented on July 16, 2024

Hi @chillydk147 @glide1178 , premium is the cost per transaction, and the weighting is only for use when you want to distribute your money to different stocks. E.g. if you want to distribute $800 to aapl & $200 to fb, you use Builder.Add(candles_for_aapl, 8).Add(candles_for_fb, 2) to do the backtest.

from trady.

karlwancl avatar karlwancl commented on July 16, 2024

The parameters for backtest should be explained. Close.

from trady.

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.