The trade produced by the node will be BUY for a positive quantity and a SELL for a negative quantity.
This convention is line with other nodes where a positive quantity is similar to long a bond or deposit.

trade

This uses the observed market data to build the trade that the node represents.
The reference data is typically used to find the start date of the trade from the valuation date.
The resulting trade is not resolved.
The notional of the trade is taken from the 'quantity' variable.
The quantity is signed and will affect whether the trade is Buy or Sell.
The valuation date is defined by the market data.

This uses the observed market data to build the trade that the node represents.
The trade is then resolved using the specified reference data if necessary.
The valuation date is defined by the market data.

Resolved objects may be bound to data that changes over time, such as holiday calendars.
If the data changes, such as the addition of a new holiday, the resolved form will not be updated.
Care must be taken when placing the resolved form in a cache or persistence layer.

initialGuess

This uses the observed market data to select a suitable initial guess.
For example, a Fixed-Ibor swap would return the market quote, which is the fixed rate,
providing that the value type is 'ZeroRate'.
The valuation date is defined by the market data.

This is primarily used as a performance hint. Since the guess is refined by
calibration, in most cases any suitable number can be returned, such as zero.