trendmanagement / Tmqr-framework-2

3 stars 0 forks source link

Contract naming #5

Open alexveden opened 7 years ago

alexveden commented 7 years ago

I'm working on exporting data from SQL to new Mongo asset index, so I propose to use following naming convention:

  1. For futures: Source contract name: F.US.CLEM83 Asset index ticker US.F.CLM83.830520, where:

    • US - market
    • F - future contract
    • CLM83 - future contract, i'm using exchange instrument name to prevent naming divergence between instrument and contract root.
    • 830520 - expiration date
  2. For options: Source name: C.US.USAG118900 Asset index ticker: US.C.F-ZBH11.110121@89.0, where:

    • US - market
    • C - call option
    • F-ZBH11 - underlying future contract (in case of stock it could be S-AAPL), it's implied that futures and options located in same market (not exchange, let say abstract market - US). So I can access to the future by requesting US.F.ZBH11
    • 110121 - expiration date
    • 89.0 - strike
  3. For stocks ticker name could be 'US.S.AAPL' or 'RU.S.GAZP'

  4. For instruments naming convention I think we need to use US.CL, US.ES, etc.

I selected such way of name due to following reasons:

  1. I can parse future or option ticker and get almost all data which I need for calculations, this approach reduces the workload of the DB and tend to be more human readable, because all information included to the name.

  2. These names are only for backtesting use, all information for execution will be in the Mongo asset index, and execution software can poll everything.

What do you think?

alexveden commented 7 years ago

Also maybe we could handle option expiration type like 'W' -weeklys, 'Q' - quarter, 'M' - monthly options. But it's also possible to do from the source code of the strategy, maybe this way could be more reliable.

nikolas-joyce commented 7 years ago

I cannot think of any particular objection it sounds good. To confirm you are thinking of including the respective futures ticker inside the asset ticker for the option with the suffix to represent the expiration cycle?

Sent from my iPhone

On Feb 7, 2017, at 4:48 AM, alexveden notifications@github.com<mailto:notifications@github.com> wrote:

Also maybe we could handle option expiration type like 'W' -weeklys, 'Q' - quarter, 'M' - monthly options. But it's also possible to do from the source code of the strategy, maybe this way could be more reliable.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/trendmanagement/Tmqr-framework-2/issues/5#issuecomment-277989266, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARobLHaqivWBADqcchtDcjSQ3q2jizvkks5raGgCgaJpZM4L5ajk.

alexveden commented 7 years ago

To confirm you are thinking of including the respective futures ticker inside the asset ticker for the option with the suffix to represent the expiration cycle?

I thought about that, but I've decided to use information useful only internally in the backtester, but all additional data for futures and options will be inside asset index records.

Future asset index record: image

Option record: image