Long Short signal code is asymmetric

1.As you can see, Long Short entry signal code is asymmetric

2.  use symmetry,  but generate same long and short entry singal  in builder, is it right?
      Because the short signal is not judged to be false at the same time in the long signal, so SQ generate lots of strategies with same long/short entry singal. and in fact, they are only buy strategies
3. add attachment


      

Attachments
Signal code.jpg
(283.29 KiB)
direction setting.jpg
(43.93 KiB)
same long short singal.jpg
(326.29 KiB)
  • Votes +2
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

b
#1

binhsir

13.04.2023 11:59

Task created

b
#2

binhsir

13.04.2023 12:00
Voted for this task.
b
#3

binhsir

13.04.2023 12:26

Description changed:

1.As you can see, Long Short entry signal code is asymmetric

2.  use symmetry,  but generate same long and short entry singal  in builder, is it right?
      Because the short signal is not judged to be false at the same time in the long signal, so SQ generate lots of strategies with same long/short entry singal. and in fact, they are only buy strategies


      

E
#4

Emmanuel

13.04.2023 23:38
Voted for this task.
MF
#5

Mark Fric

14.04.2023 08:56

Status changed from New to In progress

can you attach your strategy in .sqx format?  I cannot determine if it is a bug or not from your screenshot.

Some blocks are negated to the same value, or there can be a different reason for this.


b
#6

bentra

14.04.2023 15:38
This is by design and not a bug:
https://roadmap.strategyquant.com/tasks/sq4_5170

https://strategyquant.com/forum/topic/what-should-happen-when-short-and-long-signals-fire-at-the-same-time/


We have been told by the SQX team to use a template to get 100% symmetry. "All markets have a long bias" was the reasoning so the built in "symmetry" of SQX prefers longs.


b
#7

binhsir

15.04.2023 09:53

Description changed:

1.As you can see, Long Short entry signal code is asymmetric

2.  use symmetry,  but generate same long and short entry singal  in builder, is it right?
      Because the short signal is not judged to be false at the same time in the long signal, so SQ generate lots of strategies with same long/short entry singal. and in fact, they are only buy strategies

3. add attachment


      

Attachment Strategy 31152.sqx added

Strategy 31152.sqx
(35.72 KiB)
b
#8

binhsir

15.04.2023 10:05
to Bentra: I really can't understand the logic of this design. But I'm really not sure whether this design is wrong or not.

This time, it inadvertently generated a long and short signal, exactly the same strategy.So it's really just an only buy strategy.  Since it's an only buy strategy, I don't need short part code at all. So intuitively, I still think there is something wrong with the design logic of this piece.

b
#9

binhsir

22.04.2023 16:14

Attachment AlgoWizard template.jpg added

AlgoWizard template.jpg
(446.50 KiB)
1.To Bentra and Develop team: As you can see in new attachment, there is default condition "not ShortentrySiggal" in LongEntry of Algowizard  basic template.

So it's clear that the logic on this point in soucecode of strategy from Builder and in the Algowizard is inconsistent.

I think "not shortentrySignal" and "not LongEntrySigal" should be used symmetrically by default. Of course, the user can modify it, and SQ should not force us to use long bias. 

What's more, if I want to develop a strategy of long bias, I can use other methods. 


2.Another strange thing is that I often find a strategy through the automatic development process that has exactly the same long and short entry signals. Should SQ avoid this when generating random signals? I think it's meaningless.

b
#10

bentra

22.04.2023 22:33
I agree, the design is not symmetrical. I petitioned for symmetrical solutions but in the end sqx team said no they will not fix it, they will leave it as it is. You can use a template (templates are awesome either way) to get symmetry or use sq3 logic (I think). This support ticket is a duplicate. All we can do other than that is vote and voice here :
https://roadmap.strategyquant.com/tasks/sq4_5170

and here:
https://strategyquant.com/forum/topic/what-should-happen-when-short-and-long-signals-fire-at-the-same-time/



b
#11

bentra

24.04.2023 21:35
Here is the original I submitted and it was refused with Marks reasoning. I was complaining about the exact same thing that you are complaining about in this ticket today:
https://roadmap.strategyquant.com/tasks/sq4_5168


After that ticket (and all others like it) got refused I opened up the feature request and thread I linked to above.


b
#12

binhsir

25.04.2023 12:41
to bentra and development team:

1. Comparatively speaking, I can accept the asymmetry code template(Of course, I prefer to be symmetrical, or it's up to me.). But at least in Builder and in Algowizard, the default code template should be consistent. This is not actually being done now.

2. Since I chose both long and short option, but Builder produces quite a few strategies where the Long entry signals are exactly the same as the Short entry signals. Based on the current code template in Builder, it is actually an only buy strategy in this case. This strategy is a complete waste of computing time, because it is not what I expect.If I really need such a strategy, I just need to choose only Long option in strategy direction setting.

    It is clear that the development team's explanation for this problem is not self-justifying in logic.

MF
#13

Mark Fric

04.05.2023 13:13

Status changed from In progress to Refused

I refused this request a few times in past, I'll refuse it again. The default strategy template will be not changed, and I don't want to complicate SQX further by adding additional setting for it.

The reason why it is like this is that it is a gray area what should be done if you'll get both long and short signal - different people can have different opinions about it.


In SQX builder we decided to handle it this way, you can very easily use your own template if you want "true" symmetry.

b
#14

binhsir

05.05.2023 16:30
To Mark:

       1. I still don't understand, if this is an intentional , but why is the default template in the Algowizard symmetrical entry signal? But I respect the decision of the development team.

       2.  I need to remind you that there is another bug: Since I forced derecition as both(long and short), but the strategy generated by Builder, the entry of Long and Short signal is exactly the same, under the design of default template, it is equivalent to an only long strategy. This obviously doesn't fit my setup , and I think this should be fixed, Do you think so? Please don't ignore this,  thanks!

MF
#15

Mark Fric

09.05.2023 14:27
1. it was originally like in AlgoWizard, but the default template in Builder was changed to how it is now because of requests from users - I don't remember the exact arguments now, but it is a matter of preference, there is not just one way to handle this. 

Default template in AlgoWizard was left alone, it doesn't necessarily need to match default builder template.


2. I'm not 100% sure what you mean. There are some blocks that are negating to the same value, so it could happen that Long and Short rule is the same. But this shouldn't be very frequent and this is exactly why we do have "asymmetric" rules in builder - so that these strategies trade "normally", and long order is made if there are signals to both long and short side.


b
#16

binhsir

10.05.2023 13:19
2. Some time ago, I developed a strategy and passed various robust tests, but I did not carefully analyze the situation of long and short, and then went online. After a period of live trading, because the instrument happened to be in the big bear market, I was injured a lot, and suddenly found that this was an only buy strategy, This is not in line with my expectations. so I found this problem.

    You are right,  this is not very frequent. Or in earlier versions, I never saw this. 


Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please