class_docstr: Generic Ito process defined from a drift and volatility function.
class_docstr_tok: ["Generic","Ito","process","defined","from","a","drift","and","volatility","function","."]
docstr: Python callable calculating the instantaneous volatility.
  
  The callable should accept two real `Tensor` arguments of the same dtype and
  shape `times_shape`. The first argument is the scalar time t, the second
  argument is the value of Ito process X - `Tensor` of shape
  `batch_shape + sample_shape + [dim]`, where `batch_shape` represents a batch
  of models and `sample_shape` represents samples for each of the models. The
  result is value of volatility S_{ij}(t, X). The return value of the callable
  is a real `Tensor` of the same dtype as the input arguments and of shape
  `batch_shape + sample_shape + [dim, dim]`. For example, `sample_shape` can
  stand for `[num_samples]` for Monte Carlo sampling, or
  `[num_grid_points_1, ..., num_grid_points_dim]` for Finite Difference
  solvers.
  
  Returns:
    The instantaneous volatility callable.
docstr_tok: ["Python","callable","calculating","the","instantaneous","volatility",".","The","callable","should","accept","two","real","`","Tensor","`","arguments","of","the","same","dtype","and","shape","`","times_shape","`",".","The","first","argument","is","the","scalar","time","t",",","the","second","argument","is","the","value","of","Ito","process","X","-","`","Tensor","`","of","shape","`","batch_shape","+","sample_shape","+","[","dim","]","`",",","where","`","batch_shape","`","represents","a","batch","of","models","and","`","sample_shape","`","represents","samples","for","each","of","the","models",".","The","result","is","value","of","volatility","S_","{","ij","}","(","t",",","X",")",".","The","return","value","of","the","callable","is","a","real","`","Tensor","`","of","the","same","dtype","as","the","input","arguments","and","of","shape","`","batch_shape","+","sample_shape","+","[","dim",",","dim","]","`",".","For","example",",","`","sample_shape","`","can","stand","for","`","[","num_samples","]","`","for","Monte","Carlo","sampling",",","or","`","[","num_grid_points_1",",","...",",","num_grid_points_dim","]","`","for","Finite","Difference","solvers",".","Returns",":","The","instantaneous","volatility","callable","."]
code: def volatility_fn(self):
      """Python callable calculating the instantaneous volatility.
  
      The callable should accept two real `Tensor` arguments of the same dtype and
      shape `times_shape`. The first argument is the scalar time t, the second
      argument is the value of Ito process X - `Tensor` of shape
      `batch_shape + sample_shape + [dim]`, where `batch_shape` represents a batch
      of models and `sample_shape` represents samples for each of the models. The
      result is value of volatility S_{ij}(t, X). The return value of the callable
      is a real `Tensor` of the same dtype as the input arguments and of shape
      `batch_shape + sample_shape + [dim, dim]`. For example, `sample_shape` can
      stand for `[num_samples]` for Monte Carlo sampling, or
      `[num_grid_points_1, ..., num_grid_points_dim]` for Finite Difference
      solvers.
  
      Returns:
        The instantaneous volatility callable.
      """
      return self._volatility_fn
  
file_path: tf-quant-finance/tf_quant_finance/models/generic_ito_process.py
imports: import tensorflow.compat.v2
  from tf_quant_finance.math.pde import fd_solvers
  from tf_quant_finance.models import euler_sampling
  from tf_quant_finance.models import ito_process
label_desc: Use image node_id 6 for calling the GenericItoProcess obj's underlying member method code with example usage: obj.volatility_fn() and returns: self