It sounds like you equate the cost of purchasing the futures contract with the price quotation for the contract. That is where the disconnect is. So let's take the GC you mentioned in your initial post as an example and let me tighten my terminology a little.
The contract specification says that the "contract unit" is "100 troy ounces of gold" and that the "price quotation" is "U.S. dollars and cents per troy ounce". So let's do the math (with GCG2 price quotations as of right now):
- The last "price quotation" for GCG2 is $1,841
- That means the value of one GCG2 contract is 100 troy ounces * 1,841$/troy ounce = $184,100
- When you now purchase n of those contracts, your account must show that you hold a position of n contracts with an average cost of $184,100 each (ignoring commissions)
This is no different than holding stock positions, just that the numeric value for a stock "price quotation" is identical to the value/cost for one unit of stock.
So if your algorithm is built around the concept of "contract price quotations" (and there is nothing wrong with that) you determine the "average price quotation" for a position of GCG2 contracts in your account by dividing the "average cost" of the position by 100 (the number per contract, aka the multiplier).
´³¨¹°ù²µ±ð²Ô.
toggle quoted message
Show quoted text
On Thu, Jan 20, 2022 at 06:43 AM, Jenzi wrote:
As you can see in my first post not the average cost of my position is returned, but the underlying contract value (contract size, i.e. multiplier * price).