Fully automated futures trading

Discussion in 'Journals' started by globalarbtrader, Feb 11, 2015.

  1. In my case I provide an actual conid because it is a unique identifier. There is no chance of mixing up contracts, or having any ambiguity. The conid which I use for each instrument is stored in a file. I also store the "next conid" when a contract is getting close to expiry and I want the position to (gradually) roll over. For example: if an instrument has a quarterly rollover I specify to use the HMUZ contracts. If the currently used contract is the H one, it will search for the conid that associates with the M expiry date and stores that to become the "next conid". I may have to review the software that selects that next conid to ensure that it does not select a weekly contract which might have lower trading volume than the monthly contract.
     
    #3681     Mar 11, 2023
  2. wopr

    wopr

    Hey folks, long time no type. Down 4% here over the last 3 days.

    In other news, here I was wondering how come Rob doesn't have more shorts in bonds on, when I completely forgot about his Exo-suit (that's the name I use for his suite of exogenous risk measures. Rob, I hereby grant you permission to use this name in future books and blog posts and TTU episodes, my only condition is that you can't explain what it is, you just say it, and move on. Eg.: "Yea Niels, I had an exposure to Eurodollar, but then my Exo-suit jumped in and dealth with it. In other news, it was raining in London the other day...")

    What reminded me of that was the latest TTU episode, a good one Rob! For those interested in how Rob made the Exo-suit, see https://qoppac.blogspot.com/2022/02/exogenous-risk-overlay-take-two.html
     
    #3682     Mar 11, 2023
  3. I love the name 'exo-suit'; funnily enough one of the few people at the conference who wasn't an idiot referred to exotic options as 'exo' which was confusing.

    What reduced my exposure to bonds was more the 'off line' leverage based position limit, which indeed is exactly what I talked about in the episode.

    Rob
     
    #3683     Mar 12, 2023
  4. wopr

    wopr

    Right. I did find one thing a bit confusing though, you mentioned that those instruments that are too safe will still factor into the DO, and eg. if US2 is too safe, it will factor in a position in US10 year for example (as they are correlated). How does that work, since this limit is implemented at the upstream process - isn't the optimal unrounded position for those safe assets already 0 when it reaches the DO stage?

    Edit: I was also trying to find where in the code is that limit implemented, starting from https://github.com/robcarver17/pysystemtrade/blob/master/systems/portfolio.py#L177, but couldn't find it.
     
    #3684     Mar 12, 2023
    newbunch likes this.
  5. No, the limit is enforced inside the DO itself. So the upstream unrounded positions coming in won't have any limits applied, then the DO will know about the limits and that is where the (implicit) transfer of risk to correlated positions will happen.

    (You're looking in the wrong place: https://github.com/robcarver17/pysy..._system_optimise/optimised_positions_stage.py)

    I'm down 5% at pixel time from the 'local high' last week; there always seems to be a bit of a delay on my p&l and I don't know if that's because I stop capturing it before the official US close or something weirder.

    Rob
     
    Last edited: Mar 13, 2023
    #3685     Mar 13, 2023
    wopr likes this.
  6. wopr

    wopr

    Thanks Rob!
    In that case, I'm lost :) I thought it would be passed in as `maximum_positions` argument to `objectiveFunctionForGreedy`, but I don't see that happening in the file you linked. Then I thought it would be a part of the `constraintsForDynamicOpt` but I don't see that happening either, it seems like only `reduce_only_keys` is used.
     
    #3686     Mar 13, 2023
  7. Position limits only apply in production

    Rob
     
    #3687     Mar 14, 2023
    wopr likes this.
  8. [​IMG]

    <Joey from friends voice>How you doing?<\Joey from friends voice>

    Rob

    [​IMG]
     
    #3688     Mar 14, 2023
  9. newwurldmn

    newwurldmn

    One of my favorite parts about this thread is the intellectual honesty.

     
    #3689     Mar 14, 2023
    CarlosMata and Tradess0610 like this.
  10. blink18

    blink18

    "I'm doing pretty good"
     
    #3690     Mar 14, 2023
    Elder likes this.