Libor
Author: gregg
Creation Date: 3/3/2009 11:54 AM
profile picture

gregg

#1
Is it possible to graph Libor in WL5?
profile picture

Eugene

#2
Yes, using PlotSeries.
profile picture

Eugene

#3
Just for kicks:

CODE:
Please log in to see this code.
profile picture

gregg

#4
Yearly doesn't do much :(
... I was am going to try to find a free source for daily data and try to do the same.
profile picture

Eugene

#5
Here you go -- getting the daily Libor rate from an XML-based database somewhere on the web:

CODE:
Please log in to see this code.

profile picture

Eugene

#6
Don't forget to add a reference to System.Xml in the Editor's Reference dialog.
profile picture

Eugene

#7
In addition, notice that in both examples the received data is packed right into a Bars object - and not DataSeries - despite that it might seem logical at first because all we have is just a single data series. However, WL5 has a couple of helpful methods Bars.SaveToFile and Bars.LoadFromFile (QuickRef for more details and examples) which can be used to store the data physically instead of having to deal with global memory each time.
profile picture

gregg

#8
Interesting stuff about the Bars.SaveToFile and Bars.LoadFromFile methods...

BTW great job with WL5...Switching to C# made WL vastly more powerful.

profile picture

sprimo

#9
I know this is way after this was posted, but how would you run this. I have it loaded in my editor but would you put anything in the symbol to run it? is it handled like a strategy? if anyone is using this let me know. thanks
profile picture

Eugene

#10
Take a look at "How to Run Example Code" in the WealthScript Programming Guide.
profile picture

sprimo

#11
I was able to get the code loaded into the editor as the "how to run example code" states. I just cant get it to display or do anything. I was hoping to see a rate graph plotted out showing libor rates. the question I had was how do you run it. without a symbol to put in there is nothing to "run the strategy" with unless I am completely looking at how to use this incorrectly which is probably the case.
profile picture

Eugene

#12
Step in on any symbol for which you have the data, then click 'Run the strategy' in the Editor.
profile picture

sprimo

#13
Eugene,

I get a runtime error when I try to run it. heres the error list. had to hand copy it into notepad. think I got it all correct. Thanks

Runtime error: index was out of range. must be non-negative and less than the size of the collection
at WealthLab.Strategies.MyStrategy.Execute()
at WealthLab.WealthScript.Synchronize(Bars source)
at WealthLab.BarscaleConverter.Synchronize(Bars source, Bars bars)
at System.Collections.ObjectModel.ReadOnlyCollection`1.System.Collections.Generic.IList<T>.get_Item(Int32 index)
at System.Collections.Generic.List`1.get_item(int32 index)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument,ExceptionResource resource)
profile picture

Eugene

#14
Thank you. I'm afraid that Xignite - the site queried by the code above - turned into a paid subscription solution.

When I tried to visit the URI above, this was the server's response:
CODE:
Please log in to see this code.

profile picture

sprimo

#15
oh well thanks for the time checking into it. its encouraging to see the level of expertise yourself and cone have on this forum. gives some hope to us floundering newbies that a certain level of knowledge can be achieved. thanks again.
profile picture

Eugene

#16
It looks like the LIBOR rate solution from the Knowledge Base started working again (in WL5.6). At least I'm not getting the dreaded error message.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).