Wednesday, July 16, 2008

Ref : How to gamble

Ref : Profit Factor
source : The wisdom of the ages in acquiring wealth / by Welles Wilder

pf = (potential gain * chance) / potential loss

Pf : profit factor
potential gain : if you win, how much you will get
potential loss : if you lose, how much you will lose

If a player wants to win in a long run consistently, he must have pf
greater than 1.
Otherwise, he will be 100% sure to lose in a long run.

Ref : How to gamble
source : http://faculty.winthrop.edu/morrisr/Gambling.htm

How to Gamble
Actually, this isn't about how to gamble, it's about the mathematics
of gambling. So in a way, you're being suckered in the same way the
gambling industry lures its victims. But if you understand a few
things about the mathematics of gambling, you may, in fact, learn "how
to gamble."

There are two basic facts to know about gambling. The first is that in
every game of chance offered by gambling casinos, the gambler will
lose in the long run. There is one exception I will get to later on,
but even that's only an apparent exception, not a real one. Take
roulette, for example, the easiest game to analyze mathematically. An
American roulette wheel has 38 slots positioned around its
circumference. Eighteen of these are red, 18 are black, and 2 are
green. The red and black ones are numbered from 1 to 36, the green
ones are numbered 0 and 00. The simplest bet to make is $1 on either
red or black. If the ball lands on the color you bet on, you win back
the original $1 plus an additional $1, a total payoff of $2. If the
ball lands on the other color or 0 or 00, you lose your bet of $1. The
probability of your winning is the number of ways you can win, 18,
divided by the total number of slots on the wheel, 38, or 47.37%. It
would be an even bet if the two extra slots weren't there, resulting
in the house edge. It would also put the casinos in the business of
offering free entertainment. And they aren't.
If you make repeated bets on one color, as described above, and it
doesn't make any difference which one, you will end up receiving back
an average of 94.74 cents on every dollar bet, or a payback of 94.74%.
It turns out that this payback is exactly double the probability of
winning on a simple $1 to $1 bet and it also simplifies the discussion
of gambling probabilities. This is because every gamble has a payback
associated with it and it means the same thing for any bet. In the
case above, you will get back only about 95 cents for every $1 you put
at risk over the long haul. You will certainly win on some bets, and
you may win on a series of bets. You may even win for a night,
especially if you don't make a lot of bets. But in the long run, you
will lose. If you don't understand this, you are a potential problem
gambler.

There are of course other variations to roulette. In addition to
betting on one color, you can bet on combinations of one number, two
numbers, three, four, five and so on. If you're wondering which one's
the best, don't spend a lot of time at it. With one exception they all
have exactly the same payoff as betting on one color-94.74%. The
exception is betting on a combination of five numbers. The payoff here
is 92.1%, making it the worst bet. So much for strategy.
Most long-standing casino games and their variations have a payoff of
about 95%. Blackjack is a little higher and craps is the best of all,
assuming you ignore most of the more complicated betting options.
These side bets usually make things worse for the gambler. There is
one version, however, taking free odds, which produces an astoundingly
high payback of 99.13%. The player still loses, of course, but more
slowly.

Just about the worst form of gambling ever, in terms of payoff, is
video poker, once popular in South Carolina. The average payback for
video poker was 72%, as reported by the gambling industry itself.
(They prefer to be called the "gaming" industry on the spurious
assertion that through skillful play the gambler can somehow win. With
a payback of 72%, it's obvious who is "winning," and we can continue
to refer to them as the "gambling" industry.) So, you'll still lose in
the long run playing video games, you'll simply lose a lot more and a
lot faster. The reporting was accomplished on the honor system, by the
way, so the 72% payback may not be entirely accurate.
The second thing to know about gambling is that when individual bets
are independent of one another, it is impossible to devise a betting
system that will alter the underlying odds against you. "Independent"
means that the game has no memory from one bet to the next. In
roulette, for example, the wheel has an 18 out of 38 chance of landing
on red the first spin and the second spin and also the 100th spin. It
never varies unless the wheel somehow becomes unbalanced, an event
unlikely to alter the odds materially. A craps game constitutes a
series of independent bets because you're rolling dice and the dice
cannot remember what happened on the previous roll. As in the previous
section, you have to qualify things a little bit when talking about
video games. They rely on a computerized random number generator. I
have a good deal of experience with random number generators on PCs
and can tell you that they are, for all intents and purposes,
independent from one number to the next. I don't have any proof, but
suspect that the generators in the computer games are independent
also. A nagging skepticism tells me that if they aren't, they benefit
the operator, not the player.
Anyway, gamblers use various "systems" to try to beat the games. In
the simplest of these, the Martingale, or "double if you lose" system,
the gambler doubles the previous bet until he wins, thus "assuring"
that he will eventually win. In fact, he usually does win. But a
little analysis reveals the essential weakness of the method. Suppose
you bet a dollar and lose. Bet $2 on the second bet and lose again.
Bet $4 on the third bet, $8 on the fourth bet and so on. Let's suppose
you bet and lose on 9 successive bets. Your bet on the 10th one will
be $512. If you finally win on the 10th bet, how far ahead will you
be? You will be ahead by exactly $1, the amount you bet the first
time. Now, add up all the bets you made. You will find that you have
put at risk a total of $1,023. This is a lot of money to win just $1
and it illustrates the underlying flaw in the system. Even though you
will usually win, when you lose, you lose big. Sooner or later you
will lose everything you have. In one computer simulation, I lost 19
times in a row before I finally won on the 20th bet, putting at risk a
total of $1,048,575, all to win just $1. This was assuming a payoff of
80%. Very few people have a big enough bankroll to support this
strategy.
A mathematical analysis of a Martingale system will reveal that its
payback is exactly that of any of the individual bets. The reason is
that this system, as any other, consists of a sequence of individual,
independent bets, each with the same probability of winning and each
with the same payback. Altering the sequence of bets does nothing to
alter the odds of the individual bets. I have simulated this system,
along with others, on a computer and confirmed that it does not, in
fact, help the gambler.
Before getting back to gambling, there's at least one similarity
between gambling and the stock market (lately, there may not be much
difference). Many investors pick stocks on the basis of price
performance. They draw charts of stock prices and use these charts to
decide on when to buy a stock. It's called charting, or technical
analysis. In its simplest version, if a stock bottoms out and then
starts to climb, you should buy. If it peaks and then starts to
decline, you should sell. So you're buying and selling on trends. The
problem is that price movements may in fact be independent of one
another. If they are, these "trends" are imaginary and you can't beat
the market using technical analysis. The reason you can't follows
pretty much the same line of reasoning that says no system will work
for independent gambles. There are an awful lot of statistical studies
demonstrating that, prior to the 1990's, stock prices exhibited
independence, at least enough so that, after commissions, you couldn't
beat the market. You see, prior to the 90's large institutions
dominated the market: mutual funds, college endowment funds, pension
funds and so forth. These institutions hire high-priced analysts to
study stocks and they do a pretty good job of determining value, at
least a good enough job that they have a hard time outguessing one
another. There are a lot of studies showing this also, again prior to
the 90's, so that a stock's price at any particular time reflects all
publicly available information and is affected only by randomly
occurring outside events. This is why the term "random walk" is often
used to describe stock prices. To be more precise, stock prices follow
a process known as "random walk with upward drift," because they tend
to go up over time. During the 90's, for various reasons, many
individual investors starting making their own investment decisions.
Many of these investors were not, to put the kindest face on it,
particularly knowledgeable. (If you don't believe that, look at how
many people violated the cardinal rule of investing-diversify!-and put
all their money in one stock. And not just Enron employees!) When
enough unknowledgeable investors buy stocks on the basis of stock
movements, their actions will cause further price movements, and
trends may occur. These trends sometimes turn into bubbles, and that
was one of the big problems in the 90's. If you're interested in
further study along these lines, get a reputable investment book and
look up the Efficient Market Hypothesis.

A few paragraphs ago I mentioned that there is one exception to the
rule that every casino game results in a long-run loss to the gambler.
That exception is blackjack. Blackjack lends itself to a "system"
because, unless a new or reshuffled deck is used for every deal,
successive deals are not independent. A statistician, E. O. Thorpe,
devised a counting system in the 1960s that worked, briefly, to alter
the odds in favor of the bettor. I say "briefly" because when the
casinos realized they were being snookered they started adopting ways
to nullify this and other counting systems, such as more frequent
reshuffling of decks. If these don't work, they simply kick the
gambler out of the casino. It's actually kind of funny. Even if you
can legitimately win, they don't let you.
Remember the title, and how I conned you into reading this under the
pretense of teaching you "how to gamble?" Well, here's how-Don't!

Tuesday, July 08, 2008

Sunday, July 06, 2008

My useful links

Weather Hong Kong underground
http://www.weather.org.hk/english/index.html

Tidal information HK
http://www.hko.gov.hk/tide/estation_select.htm

Time and Date HONGKONG
http://www.timeanddate.com/worldclock/city.html?n=102

GMT
http://wwp.greenwichmeantime.com/

World time server
http://www.worldtimeserver.com/

+++++++++++++  Quotes & Charts
+++++++++++++++++++++++++++

HKG33
http://www.cfdtrading.com/cfd-charts/

AASTOCKS
http://www.aastocks.com/EN/LTP/RTPortfolioMain.aspx?&symbol=

sptrader  kgi
http://www.kgieworld.com/FuturesAndOptions/SoftwareDownload.aspx?sc_lang=en

Hong Kong Stock quotes
http://www.quotepower.com/

Warrants HK
http://hk.warrants.com/en/sgdata/list_e.cgi#topsearch

BigCharts
http://bigcharts.marketwatch.com/avatar.asp

SHK data card
http://www.shkonline.com/eng/indices.jhtml

YAHOO currency converter
http://finance.yahoo.com/currency/convert?amt=1&from=AUD&to=HKD&submit=Convert/bsr8bk

ProRealTime
http://www.prorealtime.com/en/


IPO FINET
http://www.finet.hk/mainsite/index.htm

Margin Table HKEX
http://www.hkex.com.hk/tradinfo/futuresmargin/margin.htm


MT4 EA BUILDER

download : http://www.gcitrading.com/metatrader-demo.htm

Language : http://www.metatrader.info/node/34

EA writer : http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/

http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/
http://eatbuilder.com/

++++++++++++++++++  MAP 
+++++++++++++++++++++++

HK CentaMap and Transport
http://www.centamap.com/gc/home.aspx

http://minibus.ampac.com.hk/index.php?section=1
http://www.kmb.hk/tc/
http://www.nwstbus.com.hk/home/default.aspx?intLangID=2
http://www.mtr.com.hk/

+++++++++++ Translation and Dictionary
+++++++++++++++++++++++++++++++

Translate a block of text
http://babelfish.yahoo.com/?fr=avbbf-xxen

Merriam-Webster.com/
http://www.merriam-webster.com/

The Free Dictionary
http://www.thefreedictionary.com/

http://howjsay.com/

++++++++++ File Backup or Transfer 
++++++++++++++++++++++++++++

SaveFile.com
http://www.savefile.com/client/login.php


++++++++ Calculators
++++++++++++++++++

scientific
http://ull.chemistry.uakron.edu/sci_calc.html

most functions
http://www.calculator.com/index.html

line input
http://www.math.sc.edu/cgi-bin/sumcgi/calculator.pl

pocket calculator
http://www.df.lth.se/~mikaelb/pocketcalc-enu.shtml


++++++++++ Phone directory
+++++++++++++++++++++++

PCCW white pages


+++++++++++ Virus Scan 
+++++++++++++++++++++++

http://www.bitdefender.com/scan8/ie.html

http://security.symantec.com/

http://housecall.trendmicro.com/

http://www.symantec.com/norton/sygate/index.jsp

+++++++++  Online Speed Test 
+++++++++++++++++++++++

http://www.speedtest.net/

http://testinternetspeed.org/online-speed-tests/mcafee-connection-speedometer/
http://us.mcafee.com/root/speedometer/default.asp

http://www.speedtest.net/

http://bandwidthplace.com/

http://www.speedtest.com.hk/index.htm

http://home.cfl.rr.com/eaa/Bandwidth.htm

Online Radio +++++++++
+++++++++++++++++++++++
http://www.windowsmedia.com/radioui/home.aspx

Free wifi HKBN
Free Wi-Fi@HKBN
 https://freewifi.hkbn.net/authen/login.jsp?uamip=hotmail8cdestop_user

yola else