Amoeba User Guide

Embed Size (px)

Citation preview

  • 8/4/2019 Amoeba User Guide

    1/15

    Amoeba User Guide Version 1

    Assuming youve got so far as to install Java, download the Amoeba bot and fire it up, this is the

    screen you will see. So, what does it mean and how do you use it? I will attempt to explain as simply

    as possible, screen by screen.

    Strategy 1 tab - By default, one blank strategy is opened up to start with. At any time during the

    setting of parameters or while your strat is running you can open up a new strategy to work on by using

    the New Strategy tab bottom right.

    Settings tab This is available only when you are building up your parameters, prior to clicking on

    Run or Simulate. Once you set the bot running, whether in test or live mode, the Settings tab is no

    longer available until you stop the run.

    Strategy Name just for your own reference. This doesnt have to be the same as the filename you

    use to save your settings in an .opt file (recommended). Most usefully this will remind you of what the

    strat is all about, eg martingale on banker (not recommended).

    Betfair Username and Password Needed for connecting to the Betfair API for either paper or livereal-time trading, though simulation against a saved file can be run without entering them. Note that

  • 8/4/2019 Amoeba User Guide

    2/15

    commercial versions of the Amoeba bot will normally be distributed with the username pre-entered as

    a copyright protection measure. This means that the bot will be locked for the exclusive use of the

    registered user, but will be otherwise unlimited, ie can paper or live trade or run simulations and will

    not expire (until 99990101).

    Refresh data every Change this value to 3 seconds or less if you get round stale messages and bets

    arent getting placed.

    Log odds to file leave this at its default session to build up a set of test files from your paper or live

    trading. The only time when it makes sense to suppress logging is if you have multiple strats all

    running against the same game variant, in which case logging all strats would lead to duplication. Only

    log one strat per game at a time.

    Place actual bets This is a key parameter as it means the difference between paper trading and live

    trading. Only check this when you want to trade live or you want to see the test bank graph in a

    simulation.

    Transfer out any amount above This parameter puts money out of harms way by transferring the

    stipulated amount out of the games wallet and back into the general Betfair fund. Useful if you have

    constructed a bullet-dodging strategy such as one based on Martingale or Fibonacci progressionswhere its only a matter of time before the death trade happens and you have x losses in a row, where

    x is one more than your bank can stand. Transferring money out along the way gives you a chance to

    hang on to some of your gains. Best only to use in live mode, once you have a strat youre happy with,

    as if you use it in test or simulation youll see a flat-topped graph and capped bank numbers which

    dont give you any clue as to how well youve done.

    Switch to Live Bets/Shadow Bets This allows you to stop trading once youve reached your

    objective (by switching to shadow bets) or switch from paper to live when you feel circumstances are

    favourable, based on the amount won or lost by the strat in shadow mode. Use in conjunction with the

    Place Actual Bets check box ie it doesnt make any sense saying switch to shadow bets, unless you

    already have the checkbox ticked for live trading. This option is simpler to implement than the collar

    option in the triggers tab. The difference is that the collar settings allow you to switch in and out of

    live running (or between backing and laying) multiple times, whereas this is a one-off drop-out or opt-in.

    Link to Strategy allows two or more strategies to be linked in a chain. Only really makes sense if

    these are multiple strats operating on the same game, like opposing backs and lays or different card

    numbers in HiLo. As the strats could run independently, the main purpose of linking is to see one

    consolidated Profit and Loss graph (which appears in all of the graph windows). Test by clicking once

    on the first strat in the linked chain, then clicking on the testfile once for every strat. Will open up a

    graph window for every strat. Run in real time by clicking Run on the first strat in the chain.

    Dont Apply Commission just for testing purposes you may wish to see how your strat would fare

    without commission applied. Better to leave it unchecked by default.

  • 8/4/2019 Amoeba User Guide

    3/15

    Load/Save Buttons these are to save .opt files, which is where you can save your strategies for

    future reference. I strongly recommend that every time you find a strat that looks good in paper trading

    you save it with a memorable name so you can get back to the place you were, as there are so many

    parameters to tweak that it can be impossible to recreate exactly what you had from memory.

    This is the pop-up screen which allows you to select the .opt parameters file to load.

    Simulate/Run Buttons Simulate allows you to find and select a saved .csv file with previously

    observed games, or a folder containing game files of the same type. Once you click Open, the

    simulation will run and may be paused or stopped or allowed to run to completion. On a large

    simulation, you may wish to switch off the output window to allow the graph to redraw faster. The

    Run button doesnt have such dramatic results it opens up an empty window ready fro the first bet to

    be placed. This will be in live or shadow mode depending what you have put in the Place Actual Betsbox.

    This is the pop-up screen used for selecting the file (or directory) containing your saved games data.

  • 8/4/2019 Amoeba User Guide

    4/15

    Selection Tab

    The Selection tab is at the heart of your strategy. Which game and game variant do you want to play.

    How will you select the bet type and direction, in which round will you place the bet and within what

    price boundaries.

    Play the first line allows you to select any of the currently available games, including the recentlyadded Turbo HiLo and Baccarat versions. Note that Baccarat, HiLo and Omaha Sidebets are selected

    as separate game variants.

    Back/Lay the named selection the picklists which appear will be appropriate to the game variant you

    have chosen. In most cases you will choose the named selection, but you have the option of choosing a

    calculated selection, such as the Favourite (lowest odds), The Underdog (highest odds), Clear favourite

    (nobody else matches their odds), Running Favourite (favourite in the last 2 rounds), a random

    selection or any selection between the stipulated price parameters. If you have made a choice that

    could result in more than one bet, make sure to adjust the

    Perform multiple bets parameter. If left unchecked the bet will be placed on the first qualifying

    candidate, which may not be the one you expected. Across all selections is self-explanatory. It will

    bet on all qualifiers in as many rounds as you have specified in the round selector. Be aware that thiscould result in a lot of bets being placed in any one game factor in progressive staking from the

  • 8/4/2019 Amoeba User Guide

    5/15

    staking page and you could be looking at a large liability riding on the outcome of a single game. Be

    comfortable with the use of this parameter in paper trading and simulation before going live with it.

    The programmer explains it thus Multiple bets are a funny one. For instance, if you choose "Any

    Selection" in Round 1 for BJ where the odds are between 1.01 and 2.1 and allow multiple bets, it will

    beck/lay all the Player hands. "On previous selection" means that you will probably continue to place a

    back./lay on the specific selection you chose every round. "Once per selection only" means thefollowing: In Round 1, Hand 1 (X-Poker) is favourite - you back it. In round 2, he is favourite again,

    you do nothing. In round 3, Hand 4 is favourite, so that hand is backed now.

    Round and Price Selector the default is normally to select the round for betting and to say And

    Never In subsequent rounds. The time when you may want to say Or In Any Subsequent Rounds is

    when you are waiting for a specific price and you dont mind in which round it appears. Check that the

    price selector has accepted the prices you typed in enter them in a format with at least one decimal

    even if its a round number, eg 8.0.

  • 8/4/2019 Amoeba User Guide

    6/15

    Staking Tab

    Staking can make a big difference to the performance of your strategy, both for good and for bad!

    While you are getting comfortable with the rest of the bots parameters it may be safest to leave the

    default of flat staking checked, but when you feel ready to branch out, follow the guide below.

    Starting bet can be expressed in monetary unit or percent terms. Percentage based betting probably

    seems like a better idea than it is in practice. Most strategies seem to fare better with a fixed startingbet rather than a constant percentage of the current bank. Try comparing simulations yourself to check

    this out. Liability should be selected for back bets and Return for lay. Nothing very drastic will

    happen if you set these wrongly at minimum stakes, as they will both default to 2, but it does make a

    difference at higher stakes.

    Best available ensuresyou get matched and is the usual choice. If you think you can improve your

    price by coming inside the spread, you can try to submit at real/average odds, at the risk of not being

    matched.

    If below minimum bet if your calculated or requested stake comes in below the minimum (2 in

    UK) there are 3 options given here. Defaulting to the minimum is clear enough. Simulating a sub-

    minimum bet with a simultaneous back and lay is a well-known technique, but you should be aware

    that you may end up with a larger exposure than you planned if one of the sides of the simulationdoesnt get matched. Finally you can bet in shadow mode until your calculated stake comes above the

  • 8/4/2019 Amoeba User Guide

    7/15

    minimum. This is particularly suitable for martingale or similar plans starting with penny stakes,

    where the only real bets placed are at still small stakes and at a point where (one hopes) the martingale

    sequence is about to end. Still not recommended for the faint of heart and without a lot of prior

    testing.

    Flat Staking needs no comment

    Kelley (or Kelly) Staking a popular way of calculating optimal stakes in horseracing where you

    have an idea of your value edge. If you believe you have found a consistent edge in the games, this

    would be a suitable option.

    Ladder Staking This is one of the most useful parameters within the bot and repays careful study.

    With appropriate changes to the sub-parameters it can replicate martingale, reverse martingale,

    dalembert and stretched dalembert, fibonacci series and many more staking patterns. Using the

    multiplier option, every step in the series will represent a multiple of the starting bet amount or

    percentage set at the top of the page. Otherwise you can set it to represent the actual amount bet. The

    series of numbers can be short or long and dont necessarily have to increase. You could, for example,

    start with 3, drop to 2 after a win, then progress upwards 3,4,5 etc, ensuring that you never entirely give

    up any initial winnings. A simpler example: if you want to increase your stakes moderately after a

    loss, but not chase for too long, for example while backing the player in baccarat, you could adjust theLadder dialogue so that it reads Ladder staking with a Multiplier of 1,2,3 starting at position 1

    and moving Down By 1 after a Win and Up By 1 after a loss ( and use Reset to starting position

    at series end) Alternatively, to implement an aggressive dalembert, increase by 1 after a loss but

    reduce by 0 after a win ( a loss on the final stake in the series will take you back to the start provided

    you have the reset box checked). If you do not reset at the end of a series the stake may stay stranded

    at the upper limit unless subsequent games satisfy any rules for stake reduction.

    Experiment with staking plans, changing just one factor at a time to measure its influence. Most

    strategies can be improved in back testing with judicious use of a staking plan, especially combined

    with triggers. The challenge is to find a staking plan that works as well in forward testing and live

    running.

    Progressive Staking this is traditional recovery staking, as implemented in some other bots. It canbe very dangerous if unmodified and ineffective when modified. The best plan to avoid this consuming

    your whole bank is to move money out of reach via the Transfer Money feature on the general tab.

    Also be highly selective about which bets you use this on. Experience of many users on the Exchange

    Games Forum is that seemingly impossible runs of losses will come along from time to time to trash

    simple recovery staking plans like this. The typical graph from a recovery staking strategy shows a

    smooth upward trend broken only by the occasional vertiginous dip to zero and far beyond. Have deep

    pockets, nerves of steel and extremely good luck or better still use a different approach. The

    modification options possible within this section are to spread the recovery over multiple games

    (reduces stake but increases chance of double catastrophe) using a Divisor of more than 1 and to cap

    the maximum betsize.

    Only employ non-flat staking the purpose of this is to protect the user from the effect of the above

    staking progressions when (through use of triggers for example) a period of shadow betting hascoincided with the increase of notional stakes. If not checked you may find that your first re-entry to

    live betting is at a higher than initial stake. That may be the intended result, but it should be a

    conscious choice.

  • 8/4/2019 Amoeba User Guide

    8/15

    Trading Tab

    The greening up and redding up functions (ie trading out for a gain or loss respectively) can be set

    separately or together. If used together there is no need to trigger them in the same round - it often

    works better to take a loss early, eg by redding up in round 2 only, but then to green up any time from

    round 3 onwards.

    The options available are mainly self-explanatory - experiment with various trade-out options on thesame strategy, especially with the win/loss return split. It is rarely optimal to settle for 50/50 split

    between win and loss - 100/0 or 0/100 is often the best long-term setting.

  • 8/4/2019 Amoeba User Guide

    9/15

    Triggers Tab

    This is the most complex screen in the Amoeba bot, so don't be surprised if you need to re-read and

    experiment to understand it fully. It is roughly arranged in order of complexity, so we'll start at the top.

    Switch between on wins/losses will be familiar to anyone who has followed Exchange Game forum

    discussions. It is based on the idea that if something has lost (or won) a certain number of times in a

    row, then the alternative result is "due" to happen. There is a reason why this is called "the gamblersfallacy" - in itself this is not likely to be a viable strategy. It is easy to get a strategy to show reduced

    losses by using this, but the improvement most likely corresponds to the number of games you "sit

    out". Note that as well as switching between Live and Shadow, this (and the other options on this

    page) can switch between Backing and Laying, should your strategy require this. Also, instead of

    simple number of wins or losses in a row, it is possible to stipulate a trigger sequence in the format

    WWLW and so on.

    Switch between on a Collar is a more complex tool, which is best thought of as a trailing stop

    function. If you set a collar of 10, then the bot will switch to shadow trading on any drawdown of 10

    from the maximum bank value in the current run. This allows you to sit out adverse runs on strongly

    trending strats (though a value of higher than 10 is recommended to detect most trends). You can then

    re-enter either when the shadow bank has recovered x units or percent or when the bank has fallen a

    further specified amount from the exit point. This last option (further fall) is of limited use and it isnormally best to set this to a high value, such as 5000 which is unlikely to be triggered.

  • 8/4/2019 Amoeba User Guide

    10/15

    If you believe in trending systems then you will use the collar in this straightforward manner. If you

    are a believer in mean reversion you may wish to experiment with the checkbox which says Apply

    inverted entry/exit criteria. This has the effect of flipping the collar on its head and waiting for a

    certain level of losses before entering the market, then dropping out again once a certain profit has been

    reached. This reverse collar technique can generate some of the most interesting profit graphs,

    especially when combined with aggressive negative staking plans (where the the bot only enters afterthe catastrophic shadow losses) eg

    Switch between on Averaging - this is possible the most complex of the facilities offered by the bot

    and was developed to see whether Exchange Games outcomes could be traded with technical indicators

    such as those used by the financial markets. The jury is still out (for me) on whether this is a valid

    approach, but if you want to experiment, these are the main options to play with.

    Live/Shadow - switching between backing and laying is also possible, but rarely works well unless the

    price is the same for both. In general if you are trying to catch trends in both back and lay markets on

    the same game you should set up two separate strategies, each switching between live and shadow and

    link them together.

    Averaging on the shadow bank - the other options are to average on the real bank or the recent profit

    and loss. Shadow bank gives the best indication of trends and should normally be left as the basis for

    averaging.

    MA / EMA 1,2 and 3 - MA is a simple moving average based on the number of games specified.

    EMA is an exponential moving average, which gives greater weight to the most recent results,

    according to the specified proportion. In both cases it is simplest to let Average 1 stand for your short-

    term moving average, 2 for your medium and 3 for your long.

    Calculate bands from - the bands referred to here are Bollinger Bands, used in technical analysis and

    particularly useful in range trading systems. Depending on the number of standard deviations specified

    the bot calculates a smaller or larger range either side of the chosen average. The bands can then be

    used by the trigger parameters below. If you were range trading you might look for a reversion to themean to start once the current bank or a short-term average had gone outside one of the bands.

  • 8/4/2019 Amoeba User Guide

    11/15

    Alternatively you might view penetration of a band as a strong trending signal and use it to switch from

    shadow to live trading in the direction of the breakout.

    Exit on - most of the options within the drop-down lists are self-explanatory (averages, high or low

    bands) Selected feed refers to the feed on which you decided to base your averages, so normally will

    be the shadow bank.

    You need to have your thinking head on when working through the logic of the trigger parameters, as it

    is very easy to end up trapping the opposite of what you intend by having the logical operator or the

    averages the wrong way round. A simple example might be where you want to switch from live to

    shadow trading when the fast moving average drops below the slow moving average. Here you would

    adjust the parameters to read Exiton Average 3 - Average 1 >= 1 Unit

    Enter on - Switching back from shadow to live trading adds the possibility of a second crossover

    trigger to provide confirmation of the first signal. So for example, you could say Enter on Average1 -

    Average 3 >= 1 Unit and add Average 2 (medium average) - Average 3 >= 1 Unit. If you don't need

    to use the confirming trigger, set it to the same as the principal re-entry trigger.

    As with the collar options, the moving average section offers the chance to reverse the strategy logic by

    checking the inverted box. So if your carefully crafted MA crossover trend-following system goesSouth in simulation, flip the switch and see whether it works as a mean reverter.

  • 8/4/2019 Amoeba User Guide

    12/15

    Output Tab

    The Output settings screen is the simplest to understand - just check the options that you want to see as

    output from the next bot simulation or other run. The only time you are likely to need to change this is

    if you have set up a moving average trigger, in which case your graph screen will be a mess of

    Bollinger bands and averages and you will need to unselect a few options.

  • 8/4/2019 Amoeba User Guide

    13/15

    In-Running Screens

    The Output Window

    The main output screen shows details of every bet placed, tradeouts, results and overall shadow and

    actual bank balances. In a long -running simulation you can switch off the output by clicking on the

    Output button - the totals will still continue updating but the main window will stop refreshing. Thegraph will continue to be plotted in a separate window unless you also click off the Graph button.

  • 8/4/2019 Amoeba User Guide

    14/15

    The Graph Window

    The Graph screen is what you will spend most of your time watching. The yellow line represents

    actual bank and the white line your shadow bank. These will only be separate if you have a strategywhich drops out from time to time (ie uses live/shadow switching triggers).

    To test switching strategies you need to use simulation against a saved file, as starting a live test in

    paper mode won't prevent the bot from switching into live when a trigger gets hit. Your BF funds

    could be at risk if you forward test switching strats with money in the games wallet.

    Forward testing of non-switching strategies is straightforward - just make sure that the Place Actual

    Bets box on the General Tab is left empty - your notional profit or loss will be graphed with a white

    line only.

    The Graph is resizable and shows only the previous 6,000 results to conserve memory.

  • 8/4/2019 Amoeba User Guide

    15/15

    The Statistics Window

    In this window you can see basic statistics for the current run. Points of interest include the

    comparison between your theoretical (Avg) and experienced (Real) prices, which indicates your current

    edge in your chosen market. Even more interesting as a way to compare strategy performance is the

    Avg P/L figure given under the Live column, which represents how much you are currently winningper game on average.

    ***

    And that's it for the moment. I'm sure this will be expanded in the light of feedback and any new

    releases, but I hope the above helps the user to find his or her feet. Experiment, have fun, don't commit

    real money until you know what you're doing and always remember there is a support lifeline at

    [email protected]