stock trading question

Discussion in 'Scientific Statistics Math' started by analyst41, Oct 22, 2011.

  1. analyst41

    analyst41 Guest

    Suppose you have access to an oracle that predicts that tomorrow's
    closing price will be more than tomorrow's midpoint price = (High +
    Low)/2.

    Can one profit from this information and what would be the optimal
    strategy be?

    Thanks.
     
    analyst41, Oct 22, 2011
    #1
    1. Advertisements

  2. analyst41

    sanebow Guest

    Buy Low, Sell High.
     
    sanebow, Oct 22, 2011
    #2
    1. Advertisements

  3. analyst41

    kym Guest

    An interesting toy problem.

    There is probably no way to guanentee a profit given we can't
    tell from the problem information whether every possible
    price track is allowed. If so, there is no obvious way to weight
    buys at "low" prices (e.g. a deriv of the stock index)
    against sells at "high" prices.

    But given an allowance for learning from past patterns
    (e.g. a rally or slump over the day with given probability) there should
    be an optimal stategy and ways to find it.

    E.g. use bounded rationality to create all possible FSA's with inputs
    "price went up 1 pt; prince went down 1 pt" and output "buy 1 unit;
    sell 1 unit", run against all tracks weighted against probability as
    determined from past patterns, and select "optimum" (there is
    usually more than one way to measure such things according to Arrow)
    to taste -- least regret, maximum expectation, maximin, etc.
     
    kym, Oct 22, 2011
    #3
  4. analyst41

    Rod Guest



    I think you need to add some assumptions about the distribution of prices.
    Else imagine a stock that opens low, immediately goes up and stays flat to
    the close.
    This would satisfy your criteria but I don't see many dealing opportunities.
     
    Rod, Oct 22, 2011
    #4
  5. only if the oracle is not public accessible

    I wrote a simulated anneal of 3 months of horse races and picked
    trifectas with 70% profit on every race average.

    30% if you included the favorite and made all bets in the one go at
    the start of race day, same absolute profit.

    Herc
     
    Graham Cooper, Oct 22, 2011
    #5
  6. analyst41

    kym Guest

    In sci.math wrote:
    [...]

    Here's a good strategy my procedure finds for a toy of the toy.
    Each day is divided into 100 movements.
    A movement is either up 1 pt or down 1 pt.
    At each movment trader can buy or sell 1 pt at the current price.
    Initial price per point in dollars is uniform [0,999].
    Each trader starts the day with 100 dollars.
    Margin call at end of day.
    If trader goes bust they score 0.
    Value is otherwise what they have in the bank at the end of the day
    after margin call, if any.

    Best balance at end of day after 1 mn iterations:

    state: sell/ next-st next-st
    buy if -1 if +1
    (0/1)
    0: 1/ 0 12
    1: 1/ 0 13
    2: 1/ 2 15
    3: 0/ 3 9
    4: 1/ 1 15
    5: 1/ 1 10
    6: 1/ 5 2
    7: 1/ 8 8
    8: 1/ 6 9
    9: 1/ 4 10
    10: 1/ 10 6
    11: 1/ 5 8
    12: 0/ 12 14
    13: 0/ 12 7
    14: 1/ 2 12
    15: 1/ 6 3
    start with 100, end with 3206

    The runs used random sequences of up/down such that the daily max == midpoint.
    So it's assuming all such seq are eq likely.
     
    kym, Oct 22, 2011
    #6
  7. analyst41

    JohnF Guest

    As others have mentioned, doesn't seem to be any sure-fire strategy
    for directly trading the asset. But there are all kinds of
    futures contracts derivatives that can be constructed.
    And I'd guess there's some way to make that work -- i.e., very generally
    speaking, you have information that, presumably, others don't;
    now you just need to construct a contract corresponding to that info.
    Maybe somebody can suggest an explicit construction...
     
    JohnF, Oct 22, 2011
    #7

  8. OK here's how to make millions at the race track!

    Forget the stock market, it's like one giant horse race and there's no
    useful model it's just pure prediction.

    Just get the last 2 or 3 months of race results.

    In Australia there were about 5 major tracks in capital cities and a
    half dozen country tracks in each state, about 2 main race days a week
    each, about 10 races per meet, so roughly 500 races of data, about
    5000 rows.

    Pick a random horse and all of his races. Most of the field have
    raced within the last 2 months so you'll have a lot of useful data.

    Say HORSE = "FASTIE"

    RACE 1 RACE 2 RACE 3 RACE 4
    horse1 $1.50 horse1 $2.00 FASTIE $1.80 horse1 $3.00
    FASTIE $5.00 horse2 $3.00 horse2 $5.00 FASTIE $5.50
    horse3 $7.66 horse3 $5.00 horse3 $8.00 horse3 #8.88
    horse4 $20.20 FASTIE $9.99 horse4 $50.00
    horse5 $30.00

    OK, START each horse at say $10.00

    Then check RACE1, FASTIE in RACE 1 is $5.00

    So let FASTIE = (FASTIE*10 + $5) / 11
    = $9.54
    i.e a weighted average, change it by 10% towards the race1 value.

    Same with RACE 2, FASTIE = (FASTIE*10 + $9.99) / 11

    ****

    OK so you randomly pick horses say 1,000,000 times and you have a
    rough average of each horses dividends.

    Now notice in RACE 3 FASTIE was $1.80. This probably means that RACE
    3 was a lower class.

    So now you can calculate the average WEIGHT of each RACE!

    Say FASTIE's value is $3.60

    Then $1.80 is 0.5 times where it should be!

    So now RACE3 = (RACE3*10 + $3.60/$1.80) / 11

    Same weighted average technique! Do for all horses in RACE 3.

    NOW you have a USEFUL DATABASE - each RACE has a scalar WEIGHT - and
    the values of each HORSE are more accurate!

    Instead of the basic average formula before to adjust all the horses
    ratings

    FASTIE = (FASTIE*10 + $9.99) / 11

    use

    FASTIE = (FASTIE * RACEn * T + Dividend) / (T+1)

    start T low and increase gradually so after 1,000,000 iterations the
    values only adjust slightly!

    That's all there is too it!

    Use Dividends or finishing places.

    DOES IT PICK WINNERS?

    Unfortunately no!

    The TAB takes 20% each race, so it will consistently only lose 10%!

    The only winners I could pick were by examining trends in changing
    distance for odds > 10:1. sometimes a trainer would put a horse
    showing better form in the sprint or the long distance into a new
    distance to take advantage and it could pick 1 race like that each day
    at high odds.

    But on the TRIFECTAS!!! WORKS A CHARM!

    BOX the first 4 selections and the 10% advantage accumulates!

    so why aren't I a millionaire?

    I'm a Goddam Billionaire!

    Herc
     
    Graham Cooper, Oct 22, 2011
    #8
  9. the Weight for each race is used to scale that races dividends!

    HORSEm = (HORSEm*T + RACEn*DIVIDENDmn) / (T+1)

    Do that 1,000,000 times and similar for the RACEn!

    See you at the track!

    Herc
     
    Graham Cooper, Oct 22, 2011
    #9
  10. analyst41

    kym Guest

    In sci.math wrote:
    [...]

    It's fairly easy to show that if the price is a random walk
    between open and close there is no point with >50% chance
    the close price will be greater.

    If only the random walks that have close > 1/2(min+max) then the
    probabilities of most points between open and close are close to 90%.

    IOW, knowing the condition is true admits strategies that make a profit.

    --
    [Feel the meta-evidence, Luke:]
    The great thing about science is that once you understand it you tend
    to defend it, especially against pretenders to science like the agw
    activists here and at various institutions like the CRU, GISS, Penn
    State and against political activists at the IPCC and Greenpeace.
    -- Tunderbar <>, 8 Jul 2011 11:05 -0700 (PDT)
     
    kym, Oct 23, 2011
    #10
  11. analyst41

    analyst41 Guest

    Lets assume that the returns follow Brownian motion. The Oracle looks
    ahead one day and every morning it gives you a "trade" or "no trade"
    signal ("trade" means it has observed C > (H+L)/2).

    Surely there would be observed partial price-trajectories that would
    allow positive expected value trading:

    For example: If the running High = 100 running Low = 90 and the
    current price is 91, it might make sense to buy.

    Let us say that it proceeds to go to 80 after you buy. You can now
    double down at 80 and so forth (if 80 is going to be the low of the
    day - it will close above 90).
     
    analyst41, Oct 23, 2011
    #11
  12. analyst41

    Rod Guest

    Since 1980 the oracle has been right 54% of the time with the Dow.
    Maybe just ask a bookmaker what odd they will give.
     
    Rod, Oct 24, 2011
    #12
  13. That doesn't help much. For example, analyst's strategy in the post
    above will go pearshaped if the oracle is wrong. It only works if the
    oracle is guaranteed to be correct.
     
    christian.bau, Oct 26, 2011
    #13
  14. analyst41

    Rod Guest

    That doesn't help much. For example, analyst's strategy in the post
    above will go pearshaped if the oracle is wrong. It only works if the
    oracle is guaranteed to be correct.


    Why not. You have information the bookmaker does not have.
    I'm saying don't bother dealing just make a bet.
     
    Rod, Oct 26, 2011
    #14
  15. Let's say the high of the day is $100. Unless the shares go down to
    $100 - 2n, it is guaranteed that you can sell for $100 - n. Let's say
    the shares went down to $90, you have a generous amount of money, and
    you want a guaranteed profit of $1000.

    Unless the share price goes below $88, you can sell at $94. So you buy
    250 shares which will make $1000 profit unless the price drops below
    $88.

    At $88, you buy more: Unless the share price goes below $86, you can
    sell at $93 for $5 profit. Your 250 shares would make $250 less than
    the $1000 target, so you buy 50 shares to guarantee $1000 profit
    unless the price drops below $86.

    At $86, you buy more: Unless the share price goes below $84, you can
    sell at $92 for $6 profit. Your 300 shares would make $300 less than
    the $1000 target, so you buy 50 shares to guarantee $1000 profit
    unless the price drops below $84.

    We see a nice scheme developing here: Every time the share price drops
    $2 further, you buy another 50 shares. So worst case you buy 250 at
    $90, and 50 each at $88, $86, $84, ..., $4, $2, $0. That is 45
    purchases of 50 shares at average price of $44, or 45 x $2200, or
    $99,000 on top of the initial 250 x $90 = $22,250 for a total of
    $121,250. So with $121,250 you can make a guaranteed profit of $1000
    if the price drops from $100 to $90.

    Maybe a different strategy will give slightly better results.
     
    christian.bau, Oct 26, 2011
    #15
  16. Yeh like skipping the stock market.

    Horse races are ideal for computer simulations. It's just 100,000
    simultaneous equations!

    RACE1 = horse1 > horse2 > horse3 > horse4 > horse5 > horse6
    RACE2 = horse3 > horse4 > horse1 > horse7 > horse8
    RACE3 = horse9 > horse1 > ...
    ....


    Just pick a random horse 1,000,000 times from the last 1000 races
    results.

    Say HORSE = "FASTIE"

    RACE 1 RACE 2 RACE 3 RACE 4
    horse1 $1.50 horse1 $2.00 FASTIE $1.80 horse1 $3.00
    FASTIE $5.00 horse2 $3.00 horse2 $5.00 FASTIE $5.50
    horse3 $7.66 horse3 $5.00 horse3 $8.00 horse3 #8.88
    horse4 $20.20 FASTIE $9.99 horse4 $50.00
    horse5 $30.00

    the Weight for each race is used to scale that races dividends!

    ***

    FOR T = 1 to 1,000,000

    Pick random race & random horse

    oldHORSEm = HORSEm

    HORSEm = (HORSEm*T + RACEn*DIVIDENDmn) / (T+1)

    RACEn = (RACEn * HORSEm/oldHORSEm)

    NEXT


    A basic Simulated Annealing of the Least Error Horse Ranking.

    Then just look up each Horses Ranking and pick the top 4 every race!

    Cracks Trifectas like a master locksmith cracks open a safe!

    Just program it in Excel with a bit of VBA.

    I spent months on this in MS ACCESS in 2002, but was unemployed and
    didn't have the kitty to fire it up. Won $500 on day 1 but fluctuated
    next couple days and lost my betting kitty. Now I'm working on
    CamGirls.com so no use to me.

    The pros don't play blackjack at the casino, they play poker because
    you're betting against other players not the bank!

    Herc
     
    Graham Cooper, Oct 26, 2011
    #16
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.