Thank you, Walter. Copying an existing Macro Chart was a very good idea. I’m embarrassed I didn’t think of it.
Regarding my exploration, I wanted to see how buying the S&P 500 when the market is yielding 6% and selling at 8 times earning, and then exiting when the market is yielding less than 2% and selling at 22 times earnings had performed.
Are you still receiving error reports? I need a bit more clarification on what you're trying to accomplish. Where in the platform are you looking to use these macro chart entry/exit signals?
I don’t seem able to add $SP500 to a new chart in a way that I can back test. Following your suggestion, I was able to revise a previously saved macro chart so that I could make an effort.
Once upon a time I was able to create macro charts and back test. I could be wrong but (in addition to being unable to remember what I was once able to do) I don’t think p123’s tutorial on macro charts is up to date with changes that have been subsequently made to the website.
In terms of the exploration I was attempting, I believe the four inputs would be:
#SPYield Below 6
#SPYield Below 2
If there were an #SPPriceEarnings, then #SPPriceEarnings Above 8
If there were an #SPPriceEarnings, then #SPPriceEarnings Above 22
I would set the exit / re-enter hurdles at 80 and 20, meaning when all 4 conditions were met (effectively #SPYield below 2 and #SPPriceEarnings above 22), then “I” would exit. When no conditions were met (effectively #SPYield Above 6 and #SPPriceEarnings Below 8), then I would re-enter.
Unless I am overlooking something, it looks like I would need to import #SPPriceEarnings as a custom series. In the meantime #SPYield data goes back to about 1999 so I would need to bring in more data as a custom series if I wanted to reach back earlier than 1999.
Although I wasn’t able to achieve as much as I was hoping with this exploration, I think the Macro Chart function is pretty incredible and was able to use it more effectively before.
There's an issue with Macro Charts not displaying backtests properly, and an internal ticket has been opened to address it. Sorry I didn't notice that problem sooner.
As you know, Aggregate Series can be used to make missing series.
My concern about your usage was how you plan to use the signal. I don't believe the binary signal is currently available via GetSeries(). That would be a nice addition, though.
Please forgive me because this should be so apparent but the one thing I can no longer figure out - it’s embarrassing as it must be right in front of my face - is how to specify the “y variable,” in this case the S&P 500.