logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Wednesday, July 15, 2026 3:43:50 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 2,011

Thanks: 99 times
Was thanked: 163 time(s) in 158 post(s)

Gaetano Di Prima & Fabio Baruffa, PhD's article, “Market Regime Identification Using Trend, Volatility, And Credit Conditions”, introduced a new method to dynamically adjust equity exposure based on a market risk assessment.  The formula for the assessment appears below: Regime Indicator:

Code:
{Market Regime Indentification}
{by Gaetano Di Prima & Fabio Baruffa, PhD}
{Interpretation:
  3 = Risk On
  2 = Caution
  1 OR 0 = Risk Off
  
! Requires data access to all listing instruments 
}
spy:= security("ONLINE:SPY", C);
vix:= security("ONLINE:.VIX", C);
vix3m:= security("ONLINE:.VIX3M", C);
hyg:= security("ONLINE:HYG", C);
ief:= security("ONLINE:IEF.O", C);
Trend:= spy > Mov(spy, 200, S);
volatile:= (vix / vix3m) < 1;
zData:= hyg / ief;
zScore:= (zData - Mov(zData, 100, S))/Stdev(zData, 100);
credit:= zScore > -2;
Trend + volatile + credit

Please note that the formula references online data from other instruments. The user must have access to that data for the formula to work.  The user can also choose to direct the formula to use local data by changing the "ONLINE:" part of the code to the local data format and directory path.  For example, if the user wanted to use our MSLocal data format and stored the data of the SPY in C:\My Data, they would change this line:

Code:
spy:= security("ONLINE:SPY", C);

To this:

Code:
spy:= security("MSLOCAL: C:\My Data \SPY", C);

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.