Rebalancing ideas?

tf591404tf591404 Posts: 10
edited May 2019 in Portfolio Construction

For a Multiday strategy.
I'm trying to figure out a way to rebalance my portfolio at the beginning of each month. I see the code under Account for capital_used which only shows the money used up, is there a function that shows the overall networth of the account? Also any ideas in where to put this code in, I was thinking to rebalance it 30 mins before trading day closes within the minute_bar function. Thanks!

Comments

  • ptunneyptunney Posts: 246
    edited May 2019

    There are built in account variables but these do not include networth value.

    You do not seem to have elite status yet, you should have received an email if you used the system even a small amount. If you wish to have your account upgraded to elite simply complete this form.

    With elite mode you could set up a timer triggered at a certain time.

    If you need to calculate some other value with regard to your current account position you can step through the account.position.inventory which is a list from which you can get data on date/time of entry, number of shares, entry price etc. So you can iterate through that list and calculate anything you want.

Sign In or Register to comment.