- ago
There are GAZP shares.

The cost of one share is approximately 140.84.

One lot is equal to 10 shares.

Thus, we can buy/sell a multiple of 1 lot of GAZP shares for a minimum amount of 1408.4.

In some shares, one lot can be equal to 100 shares, 1000 shares, and so on.

In order not to keep in mind the lot of different shares, I would like to set them up once in "Markets and Symbols-Symbols" and work with them in the future.

I wanted to solve this problem by increasing the "Point Value" to 10.

When testing the strategy with "Point Value" equal to 1, the result is as follows:





When testing the strategy with "Point Value" equal to 10, the result is as follows:





Thus, the result has not changed at all.

Please help me solve this problem.
0
158
22 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.97% )
- ago
#1
Did you enable Futures Mode in Backtest Settings?
0
- ago
#2
Yes, I did. It doesn't help.
0
Glitch8
 ( 12.97% )
- ago
#3
I’m afk at the moment, but it’s possible the futures processing is ignoring the symbol because margin is set to zero, and/or its security type is set to Stock.
0
- ago
#4
Will it be possible to solve this problem in the near future?
0
Cone8
 ( 6.69% )
- ago
#5
After changing the Point Value, make sure that you reload the data in the Strategy Window.
(And put something other than 0 for futures margin. )
0
- ago
#6
Cone and Glitch, hello!

Nice to read your posts. Haven't written to you in a while.

This only partially solved the problem.

However, this is not an option. Because with "Position Size" - "Percent of Equity" and "Percent" - "100" it is not possible to perform "Backtest" properly.









The "Backtest" results are different for different "Margin" values.

Maybe it makes sense to improve WL8?
0
Cone8
 ( 6.69% )
- ago
#7
We're always improving, but this seems like "one guy's problem", which I don't really understand.

If the instrument is futures, then you need to set up properly with the futures specs. It works for every futures market I'm aware of.

What is this GAZP thing?
0
- ago
#8
GAZP is a stock, not a future.

0
Cone8
 ( 6.69% )
- ago
#9
Explain the "lots" thing then. I understand it in the context of forex (which works with the Market & Symbols entries), but "lots" of a stock are just shares, right? If you want 10 shares, then just buy 10 fixed shares.

A "lot" that is sometimes 1, sometimes 10, and sometimes 100 doesn't make sense to me.
0
- ago
#10
QUOTE:
A "lot" that is sometimes 1, sometimes 10, and sometimes 100 doesn't make sense to me.

But this is precisely how Russian stocks have been trading for decades on MOEX. Their "lot" varies with the price: a higher priced stock is usually traded with 1-lots, penny stocks are traded with 100s and so on.
0
- ago
#11
Cone, yes, that's right, these are just stock lots.

For example, there is the price of stock number 1: 0.00839. 1 lot is equal to 100,000 shares, which is equal to 839.

There is also the price of stock number 2: 140.84. 1 lot is equal to 10 shares, which is equal to 1408.4.

And so on down the list.

In order to test stock number 1, I need to look at the specification of this stock and enter a multiple of 100,000.

In order to test stock number 2, I need to look at the specification of this stock and enter a multiple of 10.

This is very inconvenient. It would be great to set up lots in "Markets and Symbols" and forget about setting up stocks number 1, number 2, and so on.

It is also difficult to test across the entire "DataSet".
0
Cone8
 ( 6.69% )
- ago
#12
It seems only the Russian understand this.

How do you know what the lots are? If it's by price, what happens when prices are on the border between a 10-lot and a 100-lot? What happens to the 10-lot that you bought, and price drops a little. Does it suddenly become a 100-lot?

Give me a page that explains this.
0
- ago
#13
Cone,

here is the link to MOEX:

https://www.moex.com/msn/en-stock-instruments

The easiest option is to make it so that in "Point Value" you can put any numbers with "Security Type" - "Stock" and it will work.

Make this function and we will be happy.
0
- ago
#14
QUOTE:


But this is precisely how Russian stocks have been trading for decades on MOEX. Their "lot" varies with the price: a higher priced stock is usually traded with 1-lots, penny stocks are traded with 100s and so on.



Eugene, hello!

Thank you for your support.
0
Cone8
 ( 6.69% )
- ago
#15
No one answered my question.
You're going to have to make it clear to us. This isn't "just going to happen".
0
- ago
#16
QUOTE:
How do you know what the lots are?


Basically it's driven by the exchange's decision and is 1-lot by default. Then the exchange's rules come into play, it depends on the security type (like funds and bonds are always 1-lot), the security's price and its liquidity.

You get the "lot size" using the MOEX API (for instance, the MOEX data provider is built around it). Let's take that GAZP for example:

https://www.moex.com/en/issue.aspx?board=TQBR&code=GAZP

The QuikSharp API which powers up the QUIK broker provider also returns the lot size for a tradable.
0
- ago
#17
QUOTE:


How do you know what the lots are? If it's by price, what happens when prices are on the border between a 10-lot and a 100-lot? What happens to the 10-lot that you bought, and price drops a little. Does it suddenly become a 100-lot?



For example:

1 "Lot size" = 10 shares at 100 = 1000.

The shares increased in price by 10 times, we get 1 "Lot size" = 10 shares at 1000 = 10000.

The shares fell in price by 10 times, we get 1 "Lot size" = 10 shares at 10 = 100.
0
Cone8
 ( 6.69% )
- ago
#18
In a chart, the share prices suddenly increase and decrease by 10 times?
Seriously? I really don't get it.

What other platforms have a solution for this? What do they do?
I don't know how you can keep track of these willy nilly lot sizes when the price is changing. What are the rules?

Show me one chart example of a stock changing price and its corresponding lot size.
0
- ago
#19
Here is the GAZP price chart and this is what entering a purchase order looks like in the QUIK terminal.

0
- ago
#20
QUOTE:


In a chart, the share prices suddenly increase and decrease by 10 times?
Seriously? I really don't get it.



Stock prices do not change so quickly by 10 times. I showed this as an example.
0
- ago
#21
The problem with "Lot size" is solved very quickly. Just modify the combination in WL8, where in "Point Value" you can put any numbers with "Security Type" - "Stock" and so that it works.
0
Cone8
 ( 6.69% )
- ago
#22
Thanks. In the static sense, that 1 lot of GAZP is always 10 shares, it's clear. But the discussion above makes me believe that lot size can change with price for the same instrument; such that if GAZP when to 1000, for example, the lot size would change to 1 share. Markets & Symbols can't help with that.

Also, it's not quick and as simple as just applying Point Value to "Stock". There's a lot of backtesting and multi-currency logic and other logical paths involved. And, the way all that logic works is to apply a fixed (futures) margin value per contract (share). In the case of Stocks, this value changes with price every minute. That's do-able, but not "quick".

There are multiple things in play here that are foreign to WealthLab:
1. The BarHistory has a price, but there's a different price that you'd use to enter a stop or limit order when the lot size is more than 1 share.

2. That order price needs to be resolved using a price multiplier for the signal only. And, when the order was filled, the fill price would have to be divided by that multiplier for it to make sense in the chart.

3. With respect to Backtesting, instead of working with multiplier for price, you want to multiply the number of shares, which has the same effect on the total trade basis (cost). In this case, metadata is required to apply a price multiplier to the number of shares.

4. This number of shares can't be used for live trading, but WealthLab's Backtester also controls live trading. Consequently, the backtester wouldn't be compatible with live trading.


More thought required.
1

Reply

Bookmark

Sort