- ago
In Strategy, I set starting capital as 100,000 and Position size of of fixed value of 72,000. Basis price is Market Close this bar.

So I am expecting the # of shares to use for back testing to be 72,000 / entry price of 35.01, but the quantity is different.

Thank you,
Larry
0
335
Solved
9 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.87% )
- ago
#1
Hi Larry,

It would be a tremendous help if you could provide more details.

For example, below I ran a strategy that buys on the last bar, so will issue a signal.

I set the starting capital to 100,000 and the position size to fixed amount, 72,000. The last bar of data for SPY closed at 399.59, so I verified that my Signal does have the correct quantity of 180 shares.

0
Glitch8
 ( 11.87% )
- ago
#2
But, I would not expect the quantity to be based on the Entry Price. It is based on the Basis Price, this could be different from the entry price.

In my example above, if SPY opens at 200 tomorrow, my quantity is still 180, even though the Entry Price is quite different.
0
- ago
#3
Basis price is set to Market Close this Bar and the entry price is that specific price from last night's close. The idea is I put a limit order in, on the next day based on the closing price from yesterday. The entry price is showing correctly, but not calculating the correct # of shares.

I would think that the quantity is the position size = value of $$$ / by entry price to get the # of shares.










0
- ago
#4
QUOTE:
I would think that the quantity is the position size = value of $$$ / by entry price to get the # of shares.

How would then Wealth-Lab know the entry price to size the trade before the market opens? You can learn more about basis price in the Help > Strategy Settings > Basis Price.

I see nothing wrong in your example. EWY closed at 59.44 on Dec 2nd so the position size, determined beforehand, is correct: $72K / 59.44 = 1,211.
0
Glitch8
 ( 11.87% )
- ago
#5
The quantity is NOT value of $$$ / entry price, it is value of $$$ / basis price. The basis price and the entry price can be quite different, as I explained above for SPY opening at $200.
0
- ago
#6
...The quantity is NOT value of $$$ / entry price, it is value of $$$ / basis price...

In the Strategy settings, the Basis Price is set to Market Close this Bar. Not Market Open Next Bar, because I like place a limit order the next morning at the closing price the night before (entry price).


(I am not setting Basis to Market Open Next Bar)
Since the Basis Price is is set to Market Close this Bar, that means that Bases Price is this not the same as Entry Price the night before?

Thank you,
Larry

0
Glitch8
 ( 11.87% )
- ago
#7
Yes, I know.

There is no Entry Price of the night before.

The Entry Price is only determined when the simulated trade is "filled" by the backtester, on the FOLLOWING bar.
0
- ago
#8
QUOTE:
the Entry Price is only determined when the simulated trade is "filled" by the backtester, on the FOLLOWING bar.


Glitch,

Still confused.

I want Wealthlab to use the Entry price when calculating the # of shares to purchase.

Can I make the basis price = the entry price. otherwise, I don't understand what the entry price is used for.

Thank you,
Larry
0
Glitch8
 ( 11.87% )
- ago
#9
The Entry Price is just telling you what price the order was "filled". It can be different than the Basis Price depending on how the market opens.

Here is a limit order example - Buy XYZ at $100 Limit.

For Limit/Stop orders, the Basis Price is set to the Order Price, so let's assume we want the trade to have a $1000 position size.

Since the Basis Price is $100, then the Quantity is calculated to be 10 ($1000 / $100bp).

Tomorrow, if the market opens up at $103, but then during the day falls to $99, our order for 10 shares is filled at $100, so the Entry Price is $100.

However, if the market opens lower tomorrow at $95, our order for 10 shares gets filled at $95, so the Entry Price is $95 even though the Basis Price was $100.

1
Best Answer

Reply

Bookmark

Sort