At last I have a performance table and graph. It took a while to get to this point, so I'll share my experience in case it helps others.
I pasted the code from the .pdf supplied into Posit Cloud then manually fixed the formatting. Then used Grok to fix my errors and remove the hidden formatting codes from Adobe (The codes I knew nothing about).
The R code now ran, but I couldn't see any output. According to Grok, Posit Cloud free version blocks the output, so I installed the RStudio Desktop. A few more error messages, screen shots, Grok dialog and I'm there.
I'm a retired, non programmer, so if I can get this far, anyone can. Good luck!
Being a total novice to this sort of thing it seems a bit intimidating but the instructions are detailed and hopefully I will be able to complete the task. Thanks for providing this.
The original Risk Score only looked at high-beta exposure, as say a raw percentage (75% out of 100%), and that worked. But the Stratum algorithm produces full mixes of high, mid, and low-beta ETFs, so the signal needed more depth.
The updated version used machine-learning to discover the variables and weights based on how the data behaves in risk-on or risk-off markets. The end result is a scoring method, High beta carries a strong positive weight (+0.40), mid beta pulls the score down (–0.40), and low beta has the largest defensive influence (–0.60). Each group is capped at its real total possible exposure, like 0.75 for high beta, and adjusted with power curves.
converts it into beta percents, 0.5/0.3609/0.1371, applies the calibrated factors, and normalizes everything into a simple 0–1 gauge.
Because the model uses fixed variables, the score stays consistent even out of sample. The goal is to keep it general rather than overfitted, so it may be updated annually, but the purpose remains the same, to capture the underlying risk-on or risk-off signal inside the Stratum algorithm.
There’s another goal behind BetaMap. I know that trading a basket of ETFs every week isn’t practical for everyone. Some readers are options traders, some lean on Elliott Wave, some just want a clean read on next week’s odds.
By publishing a pre-built algorithm and the raw posture data, I’m inviting people to “build their own” around it. You can plug the Risk Score into whatever style fits your risk profile: maybe you only want a 50% allocation, maybe you stay in cash until the gauge flips, maybe you only trade one ETF or none at all. If I tried to package every possible variant, I’d lose my mind. Instead, I provide the behavioral spine, and you are free to graft it onto your own system, rules, and constraints.
Thanks for the comments. Clearly a huge body of work, hence 8000 lines of code. Congratulations. I confess a lot of this is beyond my understanding. Presumably risk scoring is the secret sauce underlying the impressive back testing results. Best for me to trade the system with a modest portion of capital and see what happens.
At last I have a performance table and graph. It took a while to get to this point, so I'll share my experience in case it helps others.
I pasted the code from the .pdf supplied into Posit Cloud then manually fixed the formatting. Then used Grok to fix my errors and remove the hidden formatting codes from Adobe (The codes I knew nothing about).
The R code now ran, but I couldn't see any output. According to Grok, Posit Cloud free version blocks the output, so I installed the RStudio Desktop. A few more error messages, screen shots, Grok dialog and I'm there.
I'm a retired, non programmer, so if I can get this far, anyone can. Good luck!
Wait what it blocks it? I tested it and got it to run in a free account that is interesting. Nice work glad you got it working and can test things!
Being a total novice to this sort of thing it seems a bit intimidating but the instructions are detailed and hopefully I will be able to complete the task. Thanks for providing this.
Happy to provide value!
Like you, I'm a total novice. I followed similar instructions for downloading data recently and they worked fine. Good luck
Thanks for posting. Looking forward to some testing. Could you share how you approach Risk scoring?
The original Risk Score only looked at high-beta exposure, as say a raw percentage (75% out of 100%), and that worked. But the Stratum algorithm produces full mixes of high, mid, and low-beta ETFs, so the signal needed more depth.
The updated version used machine-learning to discover the variables and weights based on how the data behaves in risk-on or risk-off markets. The end result is a scoring method, High beta carries a strong positive weight (+0.40), mid beta pulls the score down (–0.40), and low beta has the largest defensive influence (–0.60). Each group is capped at its real total possible exposure, like 0.75 for high beta, and adjusted with power curves.
The score takes the next week’s ETF lineup
SPXL UGE / UPW / SPXL CURE / FAS UGE / FAS UGE / BIL BIL,
converts it into beta percents, 0.5/0.3609/0.1371, applies the calibrated factors, and normalizes everything into a simple 0–1 gauge.
Because the model uses fixed variables, the score stays consistent even out of sample. The goal is to keep it general rather than overfitted, so it may be updated annually, but the purpose remains the same, to capture the underlying risk-on or risk-off signal inside the Stratum algorithm.
There’s another goal behind BetaMap. I know that trading a basket of ETFs every week isn’t practical for everyone. Some readers are options traders, some lean on Elliott Wave, some just want a clean read on next week’s odds.
By publishing a pre-built algorithm and the raw posture data, I’m inviting people to “build their own” around it. You can plug the Risk Score into whatever style fits your risk profile: maybe you only want a 50% allocation, maybe you stay in cash until the gauge flips, maybe you only trade one ETF or none at all. If I tried to package every possible variant, I’d lose my mind. Instead, I provide the behavioral spine, and you are free to graft it onto your own system, rules, and constraints.
Thanks for the comments. Clearly a huge body of work, hence 8000 lines of code. Congratulations. I confess a lot of this is beyond my understanding. Presumably risk scoring is the secret sauce underlying the impressive back testing results. Best for me to trade the system with a modest portion of capital and see what happens.
When will updated posture_with_quintile.xlsx be available?
That’s a good question it should be auto updating will check now.
I just checked the link to posture_with_quintile.xlsx. Message: "File now in owners trash". Can you restore? Thanks
Thank you, check your messages just shared a new link. Moved it to another folder to stay organized.