- ago
Hello,

First of all, genetic evolver is absolutely an amazing tool to use and I use it all the time to find new strategies! However, it got a bit confusing when, instead of using one symbol for strategies, I started using dataSets, with example below:



I am using 5 coins to test out a strategy and I often encountered limit orders giving me unrealistic profit percentages. However upon further investigation of backtest, I noticed something about limit orders all being active.

When placing limit order, does backtesting consider that, in this example, only one out of five limit orders can actually get placed and become active, because there are not sufficient funds for other 4? This is using KuCoin, where you have to invest your funds for your specified limit order. NSF ratio is below 2.



this one is a bit tougher to get words into. But is there any way I can get more realistic results when backtesting limit orders (for KuCoin)?


0
503
Solved
19 Replies

Reply

Bookmark

Sort
Glitch8
 ( 14.35% )
- ago
#1
Yes the backtester will prune multiple limit orders so that only the one closest to getting filled is considered.
1
- ago
#2
Does that not skew the results of backtesting though? As a test example, I am currently using a simple strategy with 142 cryptocurrencies, where every day, it picks 19 positions (5,01% per trade, 1x margin) with highest ROC value.





In reality, what happens is that these limit orders might not necessarily get triggered at all. Shouldn't backtester in this case try to at least simulate and pick random signals (or in this case, signals which have highest ROC value at that point), not ones that are closest to getting filled? Also, shouldn't the NSF ratio be much higher then, if only 19 out of 142 signals get filled? Am I missing something here?
0
Cone8
 ( 23.73% )
- ago
#3
Approximately 4500 trades hit the limit trigger. You were able to take on about 1500 of those and about 3000 others your Portfolio couldn't handle due to lack of buying power.

Why should the NSF ration be higher? It is what it is.
1
Glitch8
 ( 14.35% )
- ago
#4
The backtester prunes multiple limit orders from the SAME SYMBOL only. If all of the limit orders are for different symbols it works just like you described and will pick random fills if there is not sufficient simulated capital. If you re run the backtest in this case you’ll (as expected) get different results each time.
1
- ago
#5
Thank you for the replies both of you. There are things I don't yet know about this software, since I am kind of new to it.

Also thanks for clarification regarding single symbol vs dataset! That does change a lot of things. I'll see how this strategy goes to see if I'll have any other questions.

One thing though, I am not actually getting different results every time I backtest.

0
- ago
#6
https://gyazo.com/25b041d10eb6ce4c70e5e0659b114983

sorry, looks like I can't upload MP4 files directly to website, will have to find another format :)
0
Glitch8
 ( 14.35% )
- ago
#7
You’ll only get different results if you wind up having non sufficient simulated equity. Look in the metrics report, do you have any NSF positions?
1
- ago
#8
I do, as I have posted in the image above. NSF ratio is nearly 2:1.

0
Cone8
 ( 23.73% )
- ago
#9
You'll get the same result because you're using Transaction Weight. For a Limit system, its' not correct to apply Weight this way. The "correct Weight" for a stop/limit system would be a "time of day" precedence.

But it depends on the goal.

Goal 1: All Limit orders for the entire DataSet are allowed to be hit.
For this, see Strategy > Strategy Settings > Advanced Strategy Settings > Use Granular Limit/Stop Processing in the User Guide for the "right way" to backtest this Daily strategy.

Goal 2: Limit the number of orders placed
If the idea is to only place the 19 or 20 limit orders with the highest ROC into the market, then this is what you're doing. However, when you trade, you have to sort the Signals by ROC and only place the top 20 orders each day.
2
Best Answer
Glitch8
 ( 14.35% )
- ago
#10
Yes, I didn’t notice the Transaction Weight. Just remove it to see the random effect.

Like Cone said, Transaction Weight is generally intended to control which MARKET orders to place.
0
- ago
#11
You are correct. Of course, the results are always the same since genetic evolver put transaction weight hehe :) I feel a bit foolish.

Thank you for clarification, didn't think about option2 for limiting the long positions.

Is there any way to prevent genetic evolver to not put transaction weight when using limit orders?

Also second question, does strategy monitor auto-place function account for top weight limit orders when placing them? As in this case - at 2:00 am, when limit orders get refreshed, do the ones with most weight get prioritized?
0
Glitch8
 ( 14.35% )
- ago
#12
You can go to Evolver Preferences and de-select the Transaction Weight condition there, then the Evolver will no longer use it.
0
Cone8
 ( 23.73% )
- ago
#13
QUOTE:
Thank you for clarification, didn't think about option2 for limiting the long positions.
To further the clarification... I explained a way that the ROC Weight could be used, but the Strategy itself would also need logic to limit the trade candidates that way.

The way the strategy is currently, all limit orders are still valid, it's just that the priority is arranged in a way that's not realistic because we can't know which limit orders will be hit, or in what order.

QUOTE:
Also second question, does strategy monitor auto-place function account for top weight limit orders when placing them? As in this case - at 2:00 am, when limit orders get refreshed, do the ones with most weight get prioritized?
No. Weighting is for backtesting only. It only has meaning if you use it to filter the signals that you submit to the market. If you're Auto-Placing from the S. Monitor, ALL signals (limit orders) will be placed immediately.

Usually, for Daily limit strategies, you would send the orders (Signals) to the Quotes tool for triggering Auto-Place when the market approaches the limit (or stop) price. In other words, when the S. Monitor makes it Daily run, you need to [manually] Select All signals and "Send to Quotes Window", which can trigger and Auto-Place.
0
- ago
#14
QUOTE:
sorry, looks like I can't upload MP4 files directly to website, will have to find another format :)

Just a side note: you can capture your screen to animated GIF and attach it to your posts. That's MUCH preferred vs. those external image hoster links that will die away after a while.
0
- ago
#15
This is exactly what I was looking for actually, a way to "not invest" into the limit orders before they're close to getting hit. However, is there ANY way to automate this without having to manually selecting all quotes and sending them to quote window? Something like an "auto-send quote" function? It would get really tough to use this for intraday timeframes.

QUOTE:
Just a side note: you can capture your screen to animated GIF and attach it to your posts. That's MUCH preferred vs. those external image hoster links that will die away after a while.


I am using gyazo right now but I will find other alternatives.
0
- ago
#16
QUOTE:
However, is there ANY way to automate this without having to manually selecting all quotes and sending them to quote window? Something like an "auto-send quote" function?

There isn't but voting for this feature request (by clicking Thumbs Up of its first post) may bring it closer:
https://www.wealth-lab.com/Discussion/Send-to-Quotes-automatically-from-Strategy-Monitor-6724
0
Cone8
 ( 23.73% )
- ago
#17
Since you mentioned intraday... To be clear you only have to "Send to Quotes" once per day. It only takes a few seconds. The Quotes tool monitors the orders throughout the day.

Now, if you're doing this at 2am with a 24-hour market, I can understand the need for automation because:

1. You need to stop (close) the Quotes tool at the "end of the day", and,
2. open a new one with the next day's set of orders.
1
- ago
#18
QUOTE:
Since you mentioned intraday... To be clear you only have to "Send to Quotes" once per day. It only takes a few seconds. The Quotes tool monitors the orders throughout the day.

Now, if you're doing this at 2am with a 24-hour market, I can understand the need for automation because:

1. You need to stop (close) the Quotes tool at the "end of the day", and,
2. open a new one with the next day's set of orders.


Yes, that is correct. The market is open 24/7.

I meant intraday as in timeframes which are not daily, but 4-hourly / hourly / 30 minute timeframes, which would be quite impossible to keep up without some sort of automatization.

Now, from evolving strategies through genetic evolver, I noticed that some of the most profitable strategies are actually small limit order buys & sells with 100+ coin datasets in the intraday market.

Hopefully more people will upvote for this as I believe it would be one of the most revolutionary features :).
0
Cone8
 ( 23.73% )
- ago
#19
I'm not sure that we'll make Quotes an intraday tool like that, but who knows? If automation allows for auto-spawning Quote windows, maybe the line between EOD and Intraday disappears.

Meanwhile, for intraday timeframes that you can run in the Strategy Monitor, probably you need to make the strategy place orders more selectively. For example, if BTC is rising and up 5% today, there's little use for looking for a limit entry 10% down - at least not until there's a move in that direction.
0

Reply

Bookmark

Sort