- ago
From Log Viewer.

Something US related I guess, but all the tickers I used in this backtest were Russian (FINAM SDP, IMOEX - benchmark).

Error populating Metrics Report: Unable to read beyond the end of the stream.

CODE:
at System.IO.BinaryReader.InternalRead(Int32 numBytes) at System.IO.BinaryReader.ReadInt32() at WealthLab.Core.TimeSeries.ReadFromBinaryFile(String fileName, DateTime startDate, DateTime endDate, Int32 maxBars) at PrinterValue.ListInitializer(Object , String , DateTime , DateTime , Int32 , PrinterValue ) at WealthLab.Indicators.IndicatorBase.LoadDataFromCache(String folder, String dataKey, DateTime startDate, DateTime endDate, Int32 maxBars) at WealthLab.Indicators.USTreasuryFactory.LoadTreasuryData() at WealthLab.Indicators.USTreasuryFactory.GetUSTSeries(Int32 idx) at WealthLab.Indicators.USTYield.ExcludeGlobal(Int32 idx) at WealthLab.Indicators.USTYield.Populate() at WealthLab.Indicators.USTYield..ctor(BarHistory bars, YieldPeriods yp) at WealthLab.Backtest.Backtester.get_RiskFreeRateOfReturn() at WealthLab.Backtest.BasicScoreCard.VerifyVal(Object ) at WealthLab.Backtest.BasicScoreCard.Initialize(Backtester bt) at WealthLab.Backtest.MetricsBundle.GetMetric(String metricName) at WealthLab.Backtest.MetricsBundle.TryGetMember(GetMemberBinder binder, Object& result) at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at WealthLab.Backtest.BasicScoreCard.Initialize(Backtester bt) at WealthLab.Backtest.MetricsBundle.GetMetric(String metricName) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at WealthLab7.visMetricsReport.AddMetricDouble(String itemName, Boolean isColorCoded, Boolean isPctFmt, Int32 decimals, String label) at WealthLab.Backtest.BasicScoreCard.LayoutMetricsReport(IMetricsReportHost reportHost) at InvocationClient.InitRule(Object , IMetricsReportHost , InvocationClient ) at WealthLab7.visMetricsReport.Populate(Backtester backtester, Backtester backtesterBenchmark) at RegistryMethod.InitRule(Object , Backtester , Backtester , RegistryMethod ) at WealthLab7.cwStrategy.SelectModel(Object task, EventArgs col)


I'm not sure but I guess it's this exception that prevents Metrics Report from being shown when you run a backtest for the first time, it also causes Sharp Ratio, Sortino Ration and Alpha to show '-'.
0
684
Solved
11 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.10% )
- ago
#1
The US Treasury indicator is trying to read its value saved from the file. It looks like something might have gotten corrupted there. You can try deleting your entire UST folder from your WL7 user data folder, and restarting. It should re-create the indicator from scratch from a new call.

It's used to calculate the Risk Free Rate of Return and other metrics depending on that (Sharpe Ratio, etc.)



0
Best Answer
- ago
#2
Glitch, yes, thanks, this helped.

FYI:

One file was zero size, maybe that's the case.

0
- ago
#3
I got a problem with a cryptic error message.



And yes, I'm using the Basic ScoreCard, which calculates the Sharpe Ratio, which depends on the US Treasury Yield metric.

So referencing Post #1, my USTYield folder (in the WealthLab8 folder) is entirely empty. Is that bad? If so, how do I populate it? I'm running WL8 Build 87.

Also, the debug code below only returns zero, but there isn't any error message. (Maybe there should be.)
CODE:
   public override void Initialize(BarHistory bars)    {       WriteToDebugLog(Backtester.RiskFreeRateOfReturn);    }
0
Glitch8
 ( 12.10% )
- ago
#4
>>So referencing Post #1, my USTYield folder (in the WealthLab8 folder) is entirely empty. Is that bad?<<

Yes, that's where the downloaded UST Yield data should be getting placed.

>>the debug code below only returns zero<<

Metrics aren't available in Initialize. But they'll be ready by the time BacktestComplete is called, so you could access the Metrics property at that point.

I'd close WL8, delete the USTYield folder, restart, open a chart, and drag the USTYield indicator into a chart. Does it populate?
0
- ago
#5
QUOTE:
I'd close WL8, delete the USTYield folder, restart, open a chart, and drag the USTYield indicator into a chart. Does it populate?

After do that, and dragging the USTYield indicator into a Chart, it creates a new pane but that pane is empty, and there is no error log message. And the USTYield folder is never re-created.

So what's going on? Why doesn't the error log tell me?

I did upgrade from Build 80 to 87 when all this started I think. Does something need to be reset after that upgrade jump?
0
Glitch8
 ( 12.10% )
- ago
#6
I’m unsure right now. I’ll need to add more logging to see if we can learn more about this failure that’s happening at your end but not ours.
1
- ago
#7
Let me know if you want me to email my settings.txt file to you. I do have the VS debugger installed. Maybe in the Log Viewer "Log Message Sources" column, you need to add a WealthLabCore checkbox.

I could try installing Build 88 over 87 and see if the installer can fix the problem.
0
- ago
#8
I went into the Windows admin account to update WL8 from Build 87 to 88. I then repeated the procedure discussed in Post #4 in the admin account, but the USTYield directory was never created. Understand I never run WL out of the admin account except for updates.

I then ran WL Build 88 from my usual Windows user account and repeated the above procedure. This time it did create the USTYield directory, but it never populated it with files.


My conclusion is that the problem is not in the WealthLab8 User Data Folder because the admin account and my normal user account employ independent User Data Folders. So it must be some kind of install problem the installer can't fix or OS security problem the admin account can't get around. I'm running Windows 10 Pro, no domain controller.

I thought about some kind of Windows Update issue, but if that were the case, I wouldn't be the only one seeing this.

I find it weird that it can create the USTYield directory, but not populate it. So what goes on between the creation and the populating of this directory? We need more error logging in this area.
0
Glitch8
 ( 12.10% )
- ago
#9
The logging is in place for Build 89 so I think it will offer some clues. Eugene if you have any ideas here junk in because I see you did the big refactor of obtaining the USTYield data.
1
- ago
#11
Also committed a quick fix for B89 for a potential condition that I feel could've resulted in the trouble @superticker is having. It's based on his log line re: DateTime parsing error in Post #3.
1

Reply

Bookmark

Sort