Author Topic: Formula Help  (Read 778 times)

  • All members
  • Posts: 16
  • Karma: +0/-0
Formula Help
« on: Thu, 30 November, 2017, 08:02 »
Hi all,

I am trying to find what formula should be used for the following:

A 10£ lay bet was placed at 2.30. This bet will have a liability of 13£.

Now if I want to attempt to place a green up back back to get 5% of the liability (not stake) how can I calculate what odd and stake (including commission) should be used? i.e. 9.27£ at 2.48 for a 5.30% hedged profit.

From what I have understood the "attempt to green up" trigger will do the math for the stake and not liability.

Thanks

  • Administrator
  • Posts: 5988
  • Karma: +207/-2
  • Gender: Female
*
Re: Formula Help
« Reply #1 on: Thu, 30 November, 2017, 15:01 »
bp = lp/(1 - P*(lp-1)/(1-commission))

ba = lp*la/bp

Where: 

bp = back price
lp = lay price
ba = back amount
la = lay amount
P = profit percentage/100

See the example attached.
Always try your triggers in Test Mode before switching to real money!

You can get a faster response from us if you contact us via FaceBook Messenger.

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 16
  • Karma: +0/-0
Re: Formula Help
« Reply #2 on: Thu, 30 November, 2017, 18:50 »
bp = lp/(1 - P*(lp-1)/(1-commission)) ba = lp*la/bp Where: bp = back price lp = lay price ba = back amount la = lay amount P = profit percentage/100 See the example attached.

Thank you very much Oxa

  • All members
  • Posts: 16
  • Karma: +0/-0
Re: Formula Help
« Reply #3 on: Tue, 02 January, 2018, 21:37 »
Hi @Oxa

Can you please help me understand how can I can calculate the next valid odd? This is especially true with odds of 2.00+ as the tick increment changes.

Example: lay odd 2.60, attempting to get 10% profit on a 5% commission market using the bp = lp/(1 - P*(lp-1)/(1-commission)) formula

2.60/(1-0.10*(2.60-1)(1-0.05)) = 3.126582 (back price)

Since there is no 3.12 odd the only near "valid odds" are 3.10 or 3.15.
I have tested and confirmed that MF will correctly calculate the valid odd (3.15= when placing a bet but this has an impact placing the correct amount to hedge using "ba = lp*la/bp" formula as the bp used to calculate was 3.126582.

Thanks

  • Administrator
  • Posts: 5988
  • Karma: +207/-2
  • Gender: Female
*
Re: Formula Help
« Reply #4 on: Wed, 03 January, 2018, 06:49 »
Hello!

The calculation error has to be factored into these formulae. BetFair will round a bet down to 0.01, so anything beyond that will be ignored and it can affect the P/L.
Always try your triggers in Test Mode before switching to real money!

You can get a faster response from us if you contact us via FaceBook Messenger.

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 16
  • Karma: +0/-0
Re: Formula Help
« Reply #5 on: Wed, 03 January, 2018, 19:09 »
Hi

Any suggestion on how to achieve that?

I couldn't find a rounding function or something related to that. Perhaps using b_tick?

Thanks

  • Administrator
  • Posts: 5988
  • Karma: +207/-2
  • Gender: Female
*
Re: Formula Help
« Reply #6 on: Mon, 08 January, 2018, 15:02 »
The standard green-up trigger action is better at handing these errors, so it's better to use it rather than manual backing/laying.

The easiest way to get a 10% with 5% commission in mind is to factor that commission into the profit percentage (see the example trigger attached).
Always try your triggers in Test Mode before switching to real money!

You can get a faster response from us if you contact us via FaceBook Messenger.

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 16
  • Karma: +0/-0
Re: Formula Help
« Reply #7 on: Wed, 10 January, 2018, 19:31 »
The standard green-up trigger action is better at handing these errors, so it's better to use it rather than manual backing/laying. The easiest way to get a 10% with 5% commission in mind is to factor that commission into the profit percentage (see the example trigger attached).

Hi Oxa,

Thanks for your reply.

I thought about using the green-up trigger as well. But as I mentioned in the first post "the "attempt to green up" trigger will do the math for the stake and not liability". So it's great for a back-first trade but not for a lay-first.

I even thought about placing a standard 2 bet just to check what the odd would be and then place a second bet with the reaming hedge amount.

Do you see any other viable option for this?

Thanks

  • Administrator
  • Posts: 5988
  • Karma: +207/-2
  • Gender: Female
*
Re: Formula Help
« Reply #8 on: Tue, 23 January, 2018, 21:05 »
No problem, you just adjust the profit percentage so that it reflects the liability. See the attached trigger.
Always try your triggers in Test Mode before switching to real money!

You can get a faster response from us if you contact us via FaceBook Messenger.

Присоединяйтесь к нашей официальной группе ВКонтакте!

  • All members
  • Posts: 16
  • Karma: +0/-0
Re: Formula Help
« Reply #9 on: Sat, 03 February, 2018, 14:37 »
Hi Oxa,

Thank you very much. It works as planned.