# Profit switch: Ignore outliers or apply penalties

Our first version of the profit switch was really simple: select workers, select coins, pools, wallets, set fees, enter the hashrates and save the settings. Since then, we have added a lot of different new settings and parameters that can help you to tune the profit switch to your own liking:

- Select custom mining client for each coin and set the custom config for it;
- Select the custom overclocking profile for a specific algorithm;
- Decide how much more profitable the new coin needs to be to switch to it;
- Determine the time interval when you want to check for profit switch (from a minimum of 10 minutes to up to 24 hours).

While the profit switch feature is getting more and more complex, we are not near the finish yet! Today, we present one of the biggest updates - the implementation of a reward alteration function. Up to this point, the reward was calculated regarding the current difficulty, block reward, and the price of the coin on the market. This reward calculation is real-time, but it doesn’t protect you from spikes or from unreliable coins. That’s why we are introducing two new options for calculating the reward.

# Ignore outliers

The first reward alteration option is to ignore outliers. Outliers are points in the data set that are far away from the other values. For example, let’s say that the rewards for mining the coin were 1.12, 1.13, 1.10, 1.15, 1.18, and 1.14 in the last hour. The newly detected coin reward is 5.1 - we can see that this is unrealistic just by comparing the values. Selecting this method, the coin reward 5.1 will be replaced with the mean (average value) of the data set (in this example, this would be 1.14).

Coin reward is considered as an outlier when it is three standard deviation values away from the mean. The data set that is taken into account is the last 4 hours.

**Disclaimer: **When we analyzed the real-life data we noticed that rewards rarely occur as the outliers, even though you have the impression that they are pretty common. Small spikes won’t be detected as outliers as they will usually happen to the coins that are facing spikes all the time, which makes their standard deviation large and thus results in spikes not being detected as the outliers.

# Apply penalties

Because of the disclaimer from the previous section, we decided to implement another, a more strict method for dealing with spikes and unreliable coins. In this case, every coin reward will be punished by how dispersed the data is. In other words, the more dispersed the data is, the less reliable the calculated reward is. For example, let’s say that the rewards for mining the coin were 1.1, 5.2, 2.1, 1.1, 7.2, and 4.2 in the last hour. We can see by looking at the data that the data is very dispersed, which means that whichever reward we get, we cannot trust it completely. Selecting this method, the coin reward will be penalized. After that, the new, penalized reward will be also checked if it is an outlier and appropriate action will be taken.

The data set that is taken into account is the last 4 hours.

**Disclaimer:** In this case, all coins are penalized - but because some of them have the more reliable reward, the penalty will be smaller than for the others, which will give them an advantage over the unreliable coins.

# Example

In the next real-life data example, we will show you how different reward methods impact the final choice. You can examine them and see which method fits you the most. The coin names were purposely anonymized to bring focus on the numbers and not the data makers.

For each coin, we will take the last 4 hours of mining, which means 24 samples as we save the data every 10 minutes (6*4 = 24).

## Coin A

Data set: [3.2585, 3.2615, 3.2615, 3.2652, 3.2645, 3.2601, 3.2591, 3.2602, 3.2600, 3.2627, 3.2609, 3.2615, 3.2609, 3.2665, 3.2671, 3.2659, 3.2649, 3.2665, 3.2660, 3.2678, 3.2666, 3.2636, 3.2579, 3.2658]. The rewards in this data set are very consistent, the standard deviation is small, and the data dispersion is small.

If the new coin reward would be 3.262, we would get the following options:

- Normal: 3.262
- Ignore outliers: 3.262
- Apply penalties: 3.259

On the other hand, if the reward would be 4.607, we would get the following options:

- Normal: 4.607
- Ignore outliers: 3.317
- Apply penalties: 3.317

## Coin B

Data set: [2.7649, 2.7645, 6.4579, 2.7610, 2.7632, 4.6030, 4.6050, 2.7630, 4.6086, 2.7635, 4.6068, 2.7646, 1.8462, 2.7699, 2.7693, 5.5369, 2.7698, 2.7699, 4.6190, 4.6173, 2.7677, 4.6047, 2.7695, 1.8442]. The rewards in this data set are not consistent, the standard deviation and the data dispersion are large.

If the new coin reward would be 3.262, we would get the following options:

- Normal: 3.262
- Ignore outliers: 3.262
- Apply penalties: 2.148

On the other hand, if the reward would be 4.607, we would get the following options:

- Normal: 4.607
- Ignore outliers: 4.607
- Apply penalties: 3.032

## Coin C

Data set: [3.1899, 3.1864, 3.1901, 3.1881, 3.2012, 3.1821, 3.1830, 3.1820, 3.1932, 3.2043, 3.2073, 3.1884, 3.2013, 3.2098, 3.2053, 3.1950, 3.2053, 3.2235, 3.2168, 3.2056, 3.1971, 3.1885, 3.2125, 3.2131]. The rewards in this data set are consistent, the standard deviation is small, and the data dispersion is normal.

If the new coin reward would be 3.262, we would get the following options:

- Normal: 3.262
- Ignore outliers: 3.201
- Apply penalties: 3.245

On the other hand, if the reward would be 4.607, we would get the following options:

- Normal: 4.607
- Ignore outliers: 3.255
- Apply penalties: 3.255

Now you are able to select the reward method that suits you the most and apply it to your profit switch. You can find it at the bottom of the profit switch page.

Happy mining!

Want to try our profit switch function? Register a new account and start now.