Suppose the simulated account has €1,000 in cash. You buy 8 shares at €100 and pay a €1 fee. That leaves €199 in cash and a position of 8 shares. If the price stays at €100, the account is worth €999: €199 + 8 × €100. The €800 spent has become shares; the €1 fee is the cost. On selling, the program adds the proceeds to the cash available and subtracts the specified fee. Repeating these steps reconstructs the account under the new rule.
The model described above receives only prices, so the cash remaining does not affect its scores. A different model might be designed to receive available cash as well. The simulation program would then supply the number recorded in the account: €199 after this purchase, compared with €1,000 in the run without it. The model runs its calculation with the new inputs; you cannot automatically copy the score produced with €1,000. Calculating a prediction with different inputs does not mean retraining the model.