Update tradingagents/cross_asset_correlation/multi_asset_processor.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
ea49460664
commit
d7cee37e01
|
|
@ -375,8 +375,8 @@ class MultiAssetProcessor:
|
||||||
|
|
||||||
# Ensure prices are positive
|
# Ensure prices are positive
|
||||||
if (price_data <= 0).any().any():
|
if (price_data <= 0).any().any():
|
||||||
warnings.warn("Some prices are non-positive. Taking absolute values.")
|
warnings.warn("Non-positive prices found. Replacing with NaN.")
|
||||||
price_data = price_data.abs()
|
price_data[price_data <= 0] = np.nan
|
||||||
|
|
||||||
return price_data
|
return price_data
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue