macrosynergy.panel.cross_asset_effects#

cross_asset_effects(df, cids, effect_name, signal_xcats, weights_xcats, signal_signs=None)[source]#

Linear combination of a set of categories with corresponding weights and, optionally, signs. Corresponding assets’ volatilities are generally used as weights.

Parameters:
  • df (str) – QuantamentalDataFrame with time-series of categories for both values and weights for all cross-sections.

  • cids (List[str]) – List of cross-sections to compute the new quantamental category for.

  • effect_name (str) – Name of the new quantamental xcat.

  • signal_xcats (Dict[str, str]) – Dictionary of asset class names and related signals’ time-series specified as xcats, part of df.

  • weights_xcats (Dict[str, str]) – Dictionary of asset class names and related weights’ time-series specified as xcats, part of df.

  • signal_signs (Dict[str, int], optional) – Dictionary of asset class names and related signs in form of +1 / -1. Default is None, hence we assume all components contribute positively and proportionately to the final average

Return type:

pd.DataFrame