OPEN-SOURCE SCRIPT
Cash-and-Carry Yield (APR)

This indicator calculates and visualizes the annualized rate of return for Cash-and-Carry arbitrage strategies by comparing a specific Futures contract against its underlying Spot price. By automatically projecting the current price spread (basis) based on the exact time remaining until expiration, it allows traders to instantly assess the potential "risk-free" yield available in the market.
The script is engineered to support both continuous 24/7 crypto markets and traditional CME futures. It features a smart "Gap Handling" setting that allows users to choose between a strict view that respects market closes (showing "Market Closed" during weekends) or a filled view that carries over the last known price for a seamless chart experience.
Visually, the indicator displays the annualized yield as a histogram; green columns indicate a Contango market (positive yield), while red columns signal Backwardation. A Simple Moving Average (SMA) is overlaid to help identify the broader yield trend amidst volatility. An integrated dashboard table in the corner provides a real-time summary of the Spot Price, Future Price, absolute spread, and the precise number of days left until expiration. Please ensure the Futures Ticker and the corresponding Expiration Date are correctly entered in the settings for accurate time-weighted calculations.
The script is engineered to support both continuous 24/7 crypto markets and traditional CME futures. It features a smart "Gap Handling" setting that allows users to choose between a strict view that respects market closes (showing "Market Closed" during weekends) or a filled view that carries over the last known price for a seamless chart experience.
Visually, the indicator displays the annualized yield as a histogram; green columns indicate a Contango market (positive yield), while red columns signal Backwardation. A Simple Moving Average (SMA) is overlaid to help identify the broader yield trend amidst volatility. An integrated dashboard table in the corner provides a real-time summary of the Spot Price, Future Price, absolute spread, and the precise number of days left until expiration. Please ensure the Futures Ticker and the corresponding Expiration Date are correctly entered in the settings for accurate time-weighted calculations.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Life is long gamma
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Life is long gamma
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.