User Tools

Site Tools


forex:probability

Forex - Probability

Trading is thinking in probabilities and finding setups that make money.


Positive Expectancy

  • You may not make money on the trade right now, or even the next one, but if it makes money over the long run (has positive expectancy).
  • You could have a system which is 35% accurate which still makes money (and a lot of it) over time.
  • Get comfortable with uncertainty, and comfortable with losses (which are inevitable), then you will find yourself making good decisions more often than not.

Probability

                Profitable Trades
probability =  -------------------
                 Total Trades 

Example

Suppose that you have made nine trades, six of which turned out to be profitable.

                 6
probability =  -----  =  67
                 9

What is the probability of winning for a future trade?

  • The denominator of the fraction will increase by one for any outcome.
  • But with the numerator, two options are possible - a future transaction may turn out to be either profitable, or unprofitable.
    • In other words, we have two possible options:
                (6+1)            6
probability =  -------   or   -------
                (9+1)          (9+1)

Using the average of these values, has the estimate of the probability of winning as follows:

                 6 + 0.5
probability =  ----------  =  0.65
                  9 + 1

NOTE: This is slightly less than the original value of 6/9.

  • This method is called Laplace smoothing.

Smoothing using Weights

double value=price[i+center], // Price value at the center.
       max=_Point;            // Maximum deviation.
 
for(int j=0; j<period; j++)   //Calculate price deviations from the central one and the max deviation.
{
  weight[j]=MathAbs(value-price[i+j]);
  max=MathMax(max, weight[j]);
}
 
double width=(period+1)*max/period,  // Correct the maximum deviation from the center so that there are no zeros at the ends.
sum=0,
denom=0;
 
for(int j=0; j<period; j++)  // Calculate weight ratios for each price.
{
  if (Smoothing==Linear)  // Linear smoothing.
    weight[j]=1-weight[j]/width;
 
  if (Smoothing==Quadratic)  // Quadratic smoothing.
    weight[j]=1-MathPow(weight[j]/width, 2);
 
  if (Smoothing==Exponential)  // Exponential smoothing.
    weight[j]=MathExp(-weight[j]/width);
 
  sum=sum+weight[j]*price[i+j];
  denom=denom+weight[j];
}
 
buffer[i]=sum/denom;  // Indicator value.

References

forex/probability.txt · Last modified: 2022/12/15 11:26 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki