robcarver17 / pysystemtrade

Systematic Trading in python
GNU General Public License v3.0
2.62k stars 825 forks source link

Allow fixed instrument and forecast weights to be specificed as a hierarchy - BUG #1197

Closed oldlore closed 1 year ago

oldlore commented 1 year ago

Regarding #1162

I've been going through the Instrument weights and I think I've found 2 errors:

grain:
          weight: 0.25
          corn:
            weight: 0.2
            CORN: 1.0
          oats:
            weight: 0.2
            OATIES: 1.0
          rapeseed:
            weight: 0.2
            RAPESEED: 1.0
          rice:
            weight: 0.1667
            RICE: 1.0
          soy:
            weight: 0.1667
            SOYBEAN_mini: 0.333
            SOYMEAL: 0.333
            SOYOIL: 0.3333
          wheat:
            weight: 0.1667
            REDWHEAT: 0.5
            WHEAT: 0.5

corn oats rapeseed rice soy wheat 0.2+0.2+0.2+0.1667+0.1667+0.1667 = 1.1001.

Americas:
          weight: 0.4
          govvie:
            weight: 0.6
            US2: 0.143
            US3: 0.143
            US5: 0.143
            US10: 0.143
            US10U: 0.143
            US20: 0.143
            US30: 0.143
          STIR:
            weight: 0.4
            BB3M: 0.333
            SOFR: 0.333
            FED: 0.333
          Swaps:
            weight: 0.4
            USIRS2ERIS: 0.25
            USIRS5: 0.25
            USIRS5ERIS: 0.25
           USIRS10: 0.25

govvie STIR Swaps 0.6+0.4+0.4 = 1.4.

Also, I was curious if you're now using these new weights or the old IWs and FWs from your most recent config.yaml in the develop branch.

Thanks

robcarver17 commented 1 year ago

Not sure this is a bug, since no code or documentation is affected....