Run strategy on Daily data to end the current bar at arbitrary time of day
Author: sobos
Creation Date: 6/4/2018 8:48 PM
profile picture

sobos

#1
Hi all,

Hope it’s okay to post here. I just recently found the forum and am glad there’s a place to learn from other WL users, most of whom no doubt know far more than me. I searched some topics, but in many instances the discussions were over my head. I’m no programmer, I did well in HS/college in java and then python classes, but stayed pretty basic (got as far as working with matrices and arrays etc. in python, which did open the door to a lot more power but also was a lot less plainly understandable). Point being, I’m kind of fumbling along here when it comes to WLP.

I did manage to get an algo producing very good, if towards the end, very unrealistic, results (I think $134b on the SP100, but running at 10% portfolio sizing mode, which would was making for 10 billion dollar trades that are just not even possible in actuality for obvious reasons, often exceeding the market cap even, when running on small caps and mid caps at least.

I haven’t converted my portfolio over or anything, but I certainly perk up if a holding comes up with a sell alert (it’s a strictly long position algo), and have had good success in making small options plays, having an incredible rate of being correct, at least once filtered through some logical value judgement of the alert - sometimes the move has already happened as it’s lagging or it’s a very volatile stock where I see it has often been wrong (the buy/sell markers are so useful, when I see an alert I just need to check the chart to see if it’s been alerting well long term). The ones that make it through do welk, although too many fall into the “already gapped up” category, where it’s too late.

For this reason, my big question, is there any way to get an algo running on daily bar data to end the current bar at a time, say 2:45, that would allow for an analysis of the current day as if it were a full bar while the market is still open. I know you can get live data, I just don’t know if combining that with a program that otherwise just looks at bars where the bars are daily is possible. If it does sound possible, any links in the right direction towards understanding how those various aspects work would be appreciated. When it comes to the API, I’ve gad difficulty navigating to find the necessary info to even hope to change that stuff as is.

Also in general is there a beginner’s guide or anything that helps learn step by step? The built in help definitely assumes more proficiency than I have. I know just enough to be able to make changes to a code, but often parts are there that I do not understand.

I also asked this part in the Fidelity ditching WL post, but to get it noticed: How much of WL is proprietary and unaccessible beyond the API or illegal hacking, versus can be viewed and backed up in case it ever goes? I have no interest in trying to copy WL, I’m just nervous about what happens if it’s suddenly gone. I suppose at that point they could possibly still make it accessible without data support. But I don’t like the if.. I would like to fully understand and preferably backup the workings of WL in case it were to end (which I assume would look like the program just no longer working or connecting to anything). People say could I still pay for it but since Fidelity owns it, it seems if they scrap it, it’s gone, no?

I guess a shorter thing to ask is - does anyone else that relies on their algos have it all backed up in some way so that if they were forced to switch brokers or something, they would have an easier time switching, or do you just understand your code well enough that with some time, you could vet it going on some similar competing service? Luckily I have time to try to fully understand before anything could happen it looks like, but now that’s a priority.

Thanks for any advice or help for someone that has found WLP extremely useful but needs to know more. I very much hope it stays around, and I’m certainly not interested in cracking the program if the functions are hidden and proprietary, but I don’t want to be like a junkie and WLP my dope, where my strategy centralized around it is uber dependent on it staying around when they’re not so sure.

Thanks!
profile picture

Eugene

#2
Welcome aboard Joel.

It's a suboptimal support strategy to name a thread "WLP newbie questions" as well as to stack multiple unrelated questions into one big post. Next time kindly consider splitting them, searching the forum for existing threads, and if nothing is found starting a new thread for each problem. For this reason I'll rename your thread "Run strategy on Daily data to end the current bar at arbitrary time of day", move it to the proper forum category, zero in on your primary question and touch other subjects in just a few words. For your reference: Where is my topic ? Thanks.

QUOTE:
Also in general is there a beginner’s guide or anything that helps learn step by step?

Sure there is. Check out the Wealth-Lab Wiki FAQ > General > How do I get started learning Wealth-Lab?

QUOTE:
How much of WL is proprietary and unaccessible beyond the API or illegal hacking, versus can be viewed and backed up in case it ever goes?

You'll read the answer between the lines of the same FAQ, in Aesopian language: Is there a documentation for WealthLab.dll class procedures and methods?

Let's not develop these questions here in this thread and focus on your main problem which is:
QUOTE:
For this reason, my big question, is there any way to get an algo running on daily bar data to end the current bar at a time, say 2:45, that would allow for an analysis of the current day as if it were a full bar while the market is still open.

Depending on what you're after:

1. In the Strategy Monitor you could use "Daily Strategy Scheduling" feature (Wealth-Lab User Guide > Strategy Monitor > Strategy Pane) to specify the execution schedule for end-of-day strategies on a per-Strategy basis.

2. Again for EOD trading, updating Yahoo! partial data at 2:45pm could do the trick. Check out the WealthScript Programming Guide > Programming Trading Strategies > Alerts > How to: Alert for AtClose Signals. It could be semi-automated with an AutoIT script or by running a dummy Strategy in the SM with "Daily Strategy Scheduling" set to e.g. 2:45pm to gather Y! data.

However, in both scenarios it escapes me why would you want to base your decisions on the incomplete daily bar which is missing 20% of the daily action. Needless to say your indicator values, backtest performance and trades won't match.
profile picture

Cone

#3
Just to add, it's possible (but more esoteric) to use Intraday data for this purpose as well. Again, it depends on your specific purpose as well as indicators used. We've developed "partial day indicators" for some of the most common like SMA, RSI, StochK, StochD, and StdDev. For an example, perform a Strategy Download (Ctrl+O > Download) and check out the script "Active Trader 2011-01 | Trading Hybrid Indicators". See the Description for information and use Intraday bars. In your case of the 2:45 exit, you'd use 15-min bars with 5 "Anticipate Bars", one of the Strategy Parameters.
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).