Hello,
I'm currently trying to import weekly AAII sentiment data. I’ve created an ASCII data source and successfully imported the CSV file, and everything appears to be working fine.
However, when I try to open the symbol (by double-clicking in the DataSets tree), I encounter the following message: "Could not obtain historical data for symbol: AAIIBULL". The default scale is set to Daily.
I then manually change the scale to Weekly, but nothing changes immediately. If I navigate to another item in the DataSets tree and then return to the symbol AAIIBULL, the chart becomes visible. While this workaround functions, it feels somewhat awkward.
The main issue arises when I attempt to incorporate this data into my SPY trading strategy. Both of the following lines of code return null:
and
Could you help me understand what might be going wrong?
Thank you
I'm currently trying to import weekly AAII sentiment data. I’ve created an ASCII data source and successfully imported the CSV file, and everything appears to be working fine.
However, when I try to open the symbol (by double-clicking in the DataSets tree), I encounter the following message: "Could not obtain historical data for symbol: AAIIBULL". The default scale is set to Daily.
I then manually change the scale to Weekly, but nothing changes immediately. If I navigate to another item in the DataSets tree and then return to the symbol AAIIBULL, the chart becomes visible. While this workaround functions, it feels somewhat awkward.
The main issue arises when I attempt to incorporate this data into my SPY trading strategy. Both of the following lines of code return null:
CODE:
aaiiBull = GetHistoryUnsynched("AAIIBULL", HistoryScale.Weekly); aaiiBull = BarHistorySynchronizer.Synchronize(bars, aaiiBull);
and
CODE:
aaiiBull = GetHistory(bars, "AAIIBULL");
Could you help me understand what might be going wrong?
Thank you
Rename
Is your auto-generated ASCII Historical Provider enabled in the Data Manager, Historical Provider tab? You might also bring it to the top or closer to the top. Finally, you can specify the name of the DataSet in GetHistory to make it use your DataSet first.
WL8 has been supporting AAII data in a smart way through the Quandl provider (part of the DataExtensions). Have you tried that first?
EDIT: We need to reflect the availability of Quandl's data series better in the extension's description, though.
EDIT-2: Made the update:
* Visualize countless core financial and alternative data sets from Quandl like AAII investor sentiment, NAAIM, FINRA, ISM series etc.
EDIT-2: Made the update:
* Visualize countless core financial and alternative data sets from Quandl like AAII investor sentiment, NAAIM, FINRA, ISM series etc.
OK, I see a breaking change that Nasdaq returns for Quandl API requests. Furthermore, the source data series seems to have ceased to update. Disregard my message above then.
QUOTE:
Is your auto-generated ASCII Historical Provider enabled in the Data Manager, Historical Provider tab?
Yes, it was enabled, I moved to the top, explicitly specified DataSet name, no luck.
I also described the strange behaviour if I just double-click on the Symbol in the DataSet, it doesn't work for the first time.
I tried this:
CODE:
BarHistory aaiiBull1 = GetHistory(bars, "AAIIBULL", "AAII"); BarHistory aaiiBull2 = GetHistoryUnsynched("AAIIBULL", HistoryScale.Weekly);
I get the following message: Could not load Backtest Data in this Scale/Range.
I didn't try any other external DataSource, as I mostly rely on local CSV files that are most reliable and autonomous.
Sorry but the download is an EXE file. If you can place the ASCII file somewhere like Google Drive where I can download it without launching an untrusted EXE file I'll check it out.
That's really strange, I didn't upload any EXE file. Nevertheless, here is th Google Drive link: https://drive.google.com/drive/folders/1zJi6XQzDNgdBW-wZdgmiCbul_Vb5otJj?usp=sharing
Thank you
Thank you
I created a DataSet with your CSV file then ran the following code on SPY, Daily.
It worked and plotted the scaled out data for your symbol. Also, if I ran the Strategy on SPY Weekly and used GetHistory instead of GetHistoryUnsynched, it still worked. I'm not sure what's going on at your end but working fine here.
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; namespace WealthScript2 { public class MyStrategy : UserStrategyBase { //create indicators and other objects here, this is executed prior to the main trading loop public override void Initialize(BarHistory bars) { BarHistory aaiiBull = GetHistoryUnsynched("AAIIBULL", HistoryScale.Weekly); aaiiBull = BarHistorySynchronizer.Synchronize(aaiiBull, bars); PlotBarHistory(aaiiBull, "AAIIBULL", WLColor.Teal); } //execute the strategy rules here, this is executed once for each bar in the backtest history public override void Execute(BarHistory bars, int idx) { if (!HasOpenPosition(bars, PositionType.Long)) { //code your buy conditions here } else { //code your sell conditions here } } //declare private variables below } }
It worked and plotted the scaled out data for your symbol. Also, if I ran the Strategy on SPY Weekly and used GetHistory instead of GetHistoryUnsynched, it still worked. I'm not sure what's going on at your end but working fine here.
>> However, when I try to open the symbol (by double-clicking in the DataSets tree), I encounter the following message: "Could not obtain historical data for symbol: AAIIBULL". The default scale is set to Daily.<<
Although this isn’t your main issue I’m going to see about improving this behavior so the chart can open directly to weekly in this case.
Although this isn’t your main issue I’m going to see about improving this behavior so the chart can open directly to weekly in this case.
"It worked and plotted the scaled out data for your symbol."
I managed to make it work with your code, but what I had to do is to change the main symbol, Backtest Data -> Symbol: AAIIBULL -> SPY. It doesn't work with AAIIBULL, isn't that weird?
With AAIIBULL set I get "Could not load Backtest Data in this Scale/Range."
I managed to make it work with your code, but what I had to do is to change the main symbol, Backtest Data -> Symbol: AAIIBULL -> SPY. It doesn't work with AAIIBULL, isn't that weird?
With AAIIBULL set I get "Could not load Backtest Data in this Scale/Range."
Did you remember to change the scale to weekly?
Sorry, my bad. Now works fine! Thank you!!
Good, also, the annoyance you described earlier is fixed for B101. When you click your symbol that chart should default to weekly.
Your Response
Post
Edit Post
Login is required