Hello,
I'm coming back to this old thread with some news. I took Marcus' code
and made some modifications to allow JBT to use historical (i.e. daily)
indicators. Now they can run well in all modes (backtest, optimisation,
FW test, trade), without modifying the other parts of JBT code. The
logic can be managed at indicator and strategy levels and the extra
extra classes by Marcus.
As I am not a usual Java programmer, I'm sure the code can be much
improved and there are better and cleaner ways to do what I'm doing, but
in general it seems to work. I've taken traded with it for some time.
The results are not spectacular (very few trades) but I still think the
functionality is worthwile, at least for the type of JBT user I am.
BTW, my version uses yahoo finance data, but I think data can be
retrieved from IB without much change.
Is there still any interest on this? If so I can send my code and give
more details if requested.
Iñaki
Iñaki Andersen escribió:
No problem. My idea was to use something from which I can create
historical indicators and test strategies, but I'm starting to get
more familiar with JBT and Java so I think I can look at your code
more in detail and modify it.
My intention was to update the historical indicators every day, not
every hour. I was just reporting the outputs every hour to see what
was being used in the onbooksnapshot function.
No worries, I'm not going to trade with it until there is something
robust.
I'm not sure I understand what you mean with 'let me know what
intervals...". Anyway, I can do some tests and if I get to something I
can come back to the list for support. If I get blocked on some Java
issue, I may ask you.
For the moment I'm not so interested in getting the EOD data from JBT
or IB, as I am easily getting it from Yahoo Finance.
Thanks,
I
Marcus Williford escribió:
Ok, I might not get to this for a few more days, but here are some
comments.
- You are correct, I did not seed the EMA, that is something that is
probably a good idea, as it isn't valid until "period" goes by.
- I didn't test with EMA samples for every hour, is that your
configuration.
- You SHOULD be careful, this was an experiment, and meant for proof
of concept. So, if you are not going through the code and checking
all details, I would not trade with it. The goal of putting the code
out there was to provide a prototype for how it might be done, and I
was looking to see who would be really interested in it before
spending time to make it work reliable.
Based on your questions, it seems you are very interested in me
building this out.
Let me know what intervals you might need to support.
PS: There is a unit test that will convert past jbook data into EOD
data, in case you need test files.
Marcus
On Thu, Jan 24, 2013 at 11:55 AM, Iñaki Andersen
<[email protected] <mailto:[email protected]>> wrote:
Hello Marcus,
Thanks for the clarification. I have started running your code.
However, I cannot get the historical EMA well calculated. I
attach a .rar with
a) the historical file I'm using.
b) the strategy I'm running. It is the same as yours but logging
into the event record the EMA every hour, with some other data.
c) an extract of the EventRecord.htm
The problems I see for the moment are:
- the EMA is very small. Maybe it should be initialised to a real
price value and not to 0, as otherwise it may take ages to
converge if it is recalculated only every day.
- the EMA is constant, even after day changes. maybe it is
because the calculateInitial() function is called only once.
I am used to modify the 'normal' indicators but not a Java expert
and it would take me some time to really understand your code and
debug it... I hope this helps anyway. I'm still optimistic in
that the historical indicators can be very useful.
Inaki
Marcus Williford escribió:
Please check your reports/EvenReport for any stack traces,
there might be a "file not found" in there. The historical
directory should be just off of the main jbooktrader root
(provided when you launch).
The file should be named correctly too:
ES-GLOBEX-IND.txt was my example file's name.
If this doesn't help, I'll review the "tip" of the branch,
and maybe try to check-in a sample file that works out of the
box.
Marcus
--
You received this message because you are subscribed to the
Google Groups "JBookTrader" group.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:jbooktrader%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/jbooktrader?hl=en.
--
You received this message because you are subscribed to the Google
Groups "JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jbooktrader?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jbooktrader?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.