An Asian with barrier (ab) is a regular Asian with the addition of a barrier, which can be European or American.
If the option is alive on the expiry date (i.e., the knock in barrier has been hit or the knock out barrier has not been hit during the monitoring period), then the payout is calculated for the underlying Asian.
The actual underlying that is compared to the barrier (to see if the instrument should be knocked in or out) is the underlying asset price at any moment that the barrier is monitored. If the barrier monitoring is set to European this is on the expiry date only; if the barrier monitoring is set to American this is only during the defined window (which by default is set to the period of the actual underlying Asian).
Why add a barrier?
You would add a barrier because of both of the following reasons combined:
Adding a barrier makes it cheaper than the equivalent Asian. This is because it has a risk of being knocked out, or of not being knocked in.
You have a particular view on the movement of the barrier's underlying that makes the risk of the added barrier worthwhile.
Pricing an Asian with barrier in SDX Commodities & Energy
When pricing an Asian with barrier (ab) note the following:
For an American barrier, the barrier window's start date cannot be prior to the instrument's trade date; the barrier window's end date cannot be after the instrument's expiry date.
It is essential to define not only the type of barrier (i.e., knock IN or knock OUT) but also the direction of the barrier (Above or Below). This is because the definition of this instrument is such that the barrier is triggered if the spot trades “at or beyond” the barrier level at any point during the monitoring period. Accordingly the barrier is considered triggered even if the spot rate is already beyond the barrier level in the monitoring period and never actually crosses the level during this period.