class_docstr: Handles the various pricing functions for asian options.
class_docstr_tok: ["Handles","the","various","pricing","functions","for","asian","options","."]
docstr: Calculates omega_k(s, w) (eq. (15) from the referenced paper).
docstr_tok: ["Calculates","omega_k","(","s",",","w",")","(","eq",".","(","15",")","from","the","referenced","paper",")","."]
code: def omega_k(self, s, w):
      """Calculates omega_k(s, w) (eq. (15) from the referenced paper)."""
      n_real = tf.cast(self.n, dtype=self.dtype)
      # Shape batch_shape + [num_sampling_times - fixing_count + 2]
      # + [num_integration_points]
      return tf.concat(
          [
              # Shape batch_shape + [1] + [num_integration_points]
              tf.expand_dims(self.start_times, axis=-2) * s,
              # Shape batch_shape + [num_sampling_times - fixing_count + 2]
              # + [num_integration_points]
              tf.expand_dims(
                  tf.broadcast_to(
                      self.rho / (self.volvol * n_real),
                      tf.concat(
                          [self.batch_shape, [self.n - self.k_star]],
                          axis=0,
                      ),
                  ),
                  axis=-1,
              )
              * s,
              # Shape batch_shape + [1] + [num_integration_points]
              tf.expand_dims(self.rho / self.volvol, axis=-1) * w,
          ],
          axis=-2,
      )
  
file_path: tf-quant-finance/tf_quant_finance/models/heston/approximations/asian_prices.py
imports: import numpy
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.black_scholes import AveragingFrequency
  from tf_quant_finance.black_scholes import AveragingType
  from tf_quant_finance.math import integration
label_desc: Use image node_id 5 for calling the _AsianPricesHandler obj's underlying member method code with example usage: obj.omega_k(s, w) and returns: tf