'0.5% per hour profit Trading bot?

If I had CryptoCurrency trading bot that can give me 0.5% profit in hour, and the exchange fees is 0.075%, and my capital balance is $1000, how can I calculate the return profit of 365 hours using a cumulative trading strategy ?

I came up with this pseudocode, is this logic true ?

balance = 1000
for i in range(1, 365):
   balance = (balance + balance*0.005) - ((balance*0.00075) * 2)
   print(f'Trade[{i}]: {balance}')


Solution 1:[1]

You need to calculate your PnL by trades, this is done by using a position, for example:

https://github.com/c9s/bbgo/blob/main/pkg/types/position.go

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 c9s