Tag Archives: framework

Google releases open source reinforcement learning framework for training AI models

This article explains why Google is leading the way in machine learning, deep learning, and eventual artificial intelligence. Here is a summary:

Inspired by one of the main components in reward-motivated behavior in the brain and reflecting the strong historical connection between neuroscience and reinforcement learning research, this platform aims to enable the kind of speculative research that can drive radical discoveries,” Pablo Samuel Castro and Marc G. Bellemare, researchers on the Google Brain Team, wrote in a blog post. “This release also includes a set of colabs that clarify how to use our framework.”

It is the word ‘easy’ that attracts me to this framework to dig into in terms of machine learning. Also, this repository is written in Python which is an extra nice bonus as well.

Just a reminder of the latest events:

Adjusting Your Trading Algo Paremeters via Logs

For next Saturday Sept 8, I will be running an private event for my Elite members on the topic of:

This is becoming an important phase that I feel should be taught for any trading researcher in terms to tweek the performing of your trading ideas.

I am still yet to determine the time.

More sent out yesterday:

Webinar event: Build a baby automated trading system with algos require streaming

 

This is a very typical conversation I have with online strangers who want to control their own future. This will help those automated trading with altos require streaming.

A Twitter followed opened up with this conversation which created the idea to do this webinar topic.

I am thinking it may be better to pay someone to do the programming? I just don’t have the time. Do all algos require streaming from IQFEED or a third party service. I am looking at kairos have you heard of the program and any thoughts/ recommendations?

Ok I am very motivated . Sounds like python is the way to go. I have tried IBridgePy but didn’t get Far….My system is very simple .

Understanding your own coding is most predictable. I have many folks who lost thousands dues to bad programmers. This is what I have experienced among folks like yourself.

I am thinking it may be better to pay someone to do the programming? I just don’t have the time. Do all algos require streaming from IQFEED or a third party service. I am looking at kairos have you heard of the program and any thoughts/ recommendations?

Thanks. How long would you say it will take someone like myself to get a system up  and running and what services do you offer to get me to where I need to be?

It depends on your motivational level. It could take a couple of months with Python. If you try with a lower level like C++ or Java, it would be probably years but most people give up on it.

Here are some topics for the event

Understanding your own coding is most predictable. I have many folks who lost thousands dues to bad programmers. This is what I have experienced among folks like yourself.

  1. Here is what I will cover to build your ‘baby algo trading system’:
  2. 1. It depends on your asset class and broker of choice.
  3. 2. Sample way to download data with 3rd party solutions ranging from Excel to Java ion source source scanners.
  4. 3. How to use a Python package to do quick analysis using a popular technical analysis library
  5. 4. Analysis the results to assess trading order decisions
  6. 5. Which brokers with packages to execute orders

This will take place:

Note that this takes place on Tues Sep 4 dues to Labour Day!

 

You are invited to a Zoom webinar.
When: Sep 4, 2018 11:00 AM Eastern Time (US and Canada)
Topic: My WebinarWebinar event: Build a baby automated trading system with algos require streaming

Please click the link below to join the webinar:
https://zoom.us/j/309454798

Or iPhone one-tap :
US: +16465588656,,309454798# or +16699006833,,309454798#
Or Telephone:
Dial(for higher quality, dial a number based on your current location):
US: +1 646 558 8656 or +1 669 900 6833
Webinar ID: 309 454 798
International numbers available: https://zoom.us/u/xPHi0HZj

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Machine Learning framework for Algo trading on Energy markets

I went through an article which focuses on a framework for an algo trading system based on machine learning. This also focuses on the energy market. You may find this article overwhelming but it does cover all the steps involved for a compete machine learning system. I already found some applications which will be helpful for my ranking of crypto currency pairs for each trading session. Note below my webinar for Tues on ‘How I funded bitcoin and automated trades’

Note I am experimenting using both Facebook and Instagram for video delivery. I must I am happier than with the results I am seeing.

Please visit here to view

https://quantlabs.net/blog/2018/07/autograph-converts-python-tensorflow-graphs-ml-model-add-view-article-within-video/

If you want to follow my video on my Facebook page, just become a follower by going to

https://www.facebook.com/pg/quantlabsnet

We got already over 1200. I will be doing more improptu Facebook LIVE where you will be notified of when this happens.

Also, I have scheduled an online event for this Tuesday

Webinar: How I funded Bitcoin and automated trades with Binance

 

 

How I funded Bitcoin and automated trades with Binance. I explain the entire steps involved and different options available

 

 

Description

I will go through these steps as explained at

How I deposited cash into Bitcoin into Binance with an ATM and cash

https://quantlabs.net/blog/2018/07/how-i-deposited-cash-into-bitcoin-into-binance-with-an-atm-and-cash/

Send order to Binance exchange with Python CCXT package

https://quantlabs.net/blog/2018/07/unknown-error-send-order-to-binance-exchange-with-python-ccxt-package/

 

Time

Jul 24, 2018 7:00 PM Eastern Time (US and Canada)

 

Login details

 

Hi there,

You are invited to a Zoom webinar.
When: Jul 24, 2018 7:00 PM Eastern Time (US and Canada)
Topic: How I funded Bitcoin and automated trades with Binance

Please click the link below to join the webinar:
https://zoom.us/j/824670655

Or iPhone one-tap :
US: +16699006833,,824670655# or +16465588656,,824670655#
Or Telephone:
Dial(for higher quality, dial a number based on your current location):
US: +1 669 900 6833 or +1 646 558 8656
Webinar ID: 824 670 655
International numbers available: https://zoom.us/u/PVmSqBuI

You bet that this new automated trading with Binance will be part of Analytics service.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

new article comments on these topics with a ML framework for algo trading

new article comments on these topics with a ML framework for algo trading

I got new article videos on by checking out below

 

AutoGraph converts Python into TensorFlow graphs for ML Model

Machine Learning framework for Algorithmic trading on Energy markets

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Machine Learning framework for Algorithmic trading on Energy markets

Machine Learning framework for Algorithmic trading on Energy markets

I add my view of this article within this video

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

dot net framework array to r program code through the R CSharp package

Note: I really no longer support dot net framework array to r anymore. This means that I don’t support .NET nor Microsoft nor Windows anymore due to  back door security concerns I have with their product. I would strongly Python and other open source technologies over Microsoft product Also, this R posting is here as a courtesy due to R is still popular. Also remember this link recommended from my Academy section is from 2012 so it might no longer work.

Very Nice! My C# program calls R Code through the R.NET package. 

How to get R connect to NOSQL scalable database Redis with doRedis R package for parallelization

Whoa! I finally got this working with R.NET. I can get my C# appliction call directly R code which is very nice. There is a nasty bug on the search path of R so note at the beginning of the code as well. Get more info about R.Net package from http://rdotnet.codeplex.com/. Here is the C# code but don’t foret to add the.NET.DLL DLL reference in your Visual Studio:

Enjoy this C Sharp code

using System;
using System.Linq;
using RDotNet;

class Program
{
    static void Main(string[] args)
    {
        //code solution from http://stackoverflow.com/questions/7960738/importing-mgcv-fails-because-rlapack-dll-cannot-be-found
        string rhome = System.Environment.GetEnvironmentVariable(“R_HOME”);
        if (string.IsNullOrEmpty(rhome))
            rhome = @”C:Program FilesRR-2.15.0″;

        System.Environment.SetEnvironmentVariable(“R_HOME”, rhome);
        System.Environment.SetEnvironmentVariable(“PATH”, System.Environment.GetEnvironmentVariable(“PATH”) + “;” + rhome + @”bini386″);

        // Set the folder in which R.dll locates.
        //REngine.SetDllDirectory(@”C:Program FilesRR-2.12.0bini386″);
        REngine.SetDllDirectory(@”C:Program FilesRR-2.15.0bini386″);
        using (REngine engine = REngine.CreateInstance(“RDotNet”, new[] { “-q” }))  // quiet mode
        {
            foreach (string path in engine.EagerEvaluate(“.libPaths()”).AsCharacter())
            {
               Console.WriteLine(path);
            }
            //engine.EagerEvaluate(“.libPaths(“C:/Program Files/R/R-2.15.0/library”);

            // .NET Framework array to R vector.
            NumericVector group1 = engine.CreateNumericVector(new double[] { 30.02, 29.99, 30.11, 29.97, 30.01, 29.99 });
            engine.SetSymbol(“group1”, group1);
            // Direct parsing from R script.
            NumericVector group2 = engine.EagerEvaluate(“group2 <- c(29.89, 29.93, 29.72, 29.98, 30.02, 29.98)”).AsNumeric();

            // Test difference of mean and get the P-value.
            GenericVector testResult = engine.EagerEvaluate(“t.test(group1, group2)”).AsList();
            double p = testResult[“p.value”].AsNumeric().First();

            Console.WriteLine(“Group1: [{0}]”, string.Join(“, “, group1));
            Console.WriteLine(“Group2: [{0}]”, string.Join(“, “, group2));
            Console.WriteLine(“P-value = {0:0.000}”, p);
        }
    }
}

 

Here is an C# example:

using System;
using System.Linq;
using RDotNet;

class Program
{
    static void Main(string[] args)
    {
        //code solution from http://stackoverflow.com/questions/7960738/importing-mgcv-fails-because-rlapack-dll-cannot-be-found
        string rhome = System.Environment.GetEnvironmentVariable(“R_HOME”);
        if (string.IsNullOrEmpty(rhome))
            rhome = @”C:Program FilesRR-2.15.0″;

        System.Environment.SetEnvironmentVariable(“R_HOME”, rhome);
        System.Environment.SetEnvironmentVariable(“PATH”, System.Environment.GetEnvironmentVariable(“PATH”) + “;” + rhome + @”bini386″);

        // Set the folder in which R.dll locates.
        //REngine.SetDllDirectory(@”C:Program FilesRR-2.12.0bini386″);
        REngine.SetDllDirectory(@”C:Program FilesRR-2.15.0bini386″);
        using (REngine engine = REngine.CreateInstance(“RDotNet”, new[] { “-q” }))  // quiet mode
        {
            foreach (string path in engine.EagerEvaluate(“.libPaths()”).AsCharacter())
            {
               Console.WriteLine(path);
            }
            engine.EagerEvaluate(“.libPaths(“C:/Program Files/R/R-2.15.0/library”);

            // .NET Framework array to R vector.
            //NumericVector group1 = engine.CreateNumericVector(new double[] { 30.02, 29.99, 30.11, 29.97, 30.01, 29.99 });
            //engine.SetSymbol(“group1”, group1);
            //// Direct parsing from R script.
            //NumericVector group2 = engine.EagerEvaluate(“group2 <- c(29.89, 29.93, 29.72, 29.98, 30.02, 29.98)”).AsNumeric();

            //// Test difference of mean and get the P-value.
            //GenericVector testResult = engine.EagerEvaluate(“t.test(group1, group2)”).AsList();
            //double p = testResult[“p.value”].AsNumeric().First();

            //Console.WriteLine(“Group1: [{0}]”, string.Join(“, “, group1));
            //Console.WriteLine(“Group2: [{0}]”, string.Join(“, “, group2));
            //Console.WriteLine(“P-value = {0:0.000}”, p);

            //example to call complete R script from http://rdotnet.codeplex.com/discussions/262426
            //REngine R = REngine.GetInstanceFromID(“RDotNet”);
            //R.EagerEvaluate(“source(“MyRscript.r”)”);
            engine.EagerEvaluate(“source(“test.r”)”);
            Console.ReadLine();
        }
    }
}

Here is R script test.r which resides in the same Release directory as the C# program.

G<-c(1,2,3)
G
cat(‘hello from r’, G)

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

A deep learning framework for financial time series using stacked autoencoders and long-short term memory

A deep learning framework for financial time series using stacked autoencoders and long-short term memory

Most accurate machine deep learning model type?

This appears to use LSAM and SAE (long short term memory and stacked auto encoders) which appears to be more accurate than recurrent neural network (RNN).  Do I sound like a machine learning experience here? Haha. I am way off it. This does show that this technique could be most accurate when it comes to forecasting financial time series.

Here are the links

http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0180944

Python code example https://github.com/dzitkowskik/StockPredictionRNN

https://en.wikipedia.org/wiki/Long_short-term_memory

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Is Google TensorFlow the right machine learning framework to go with for systematic trading

I just wanted to go over with you a recent article found here at KD Nuggets. They’re a very popular website for machine learning, data science. I don’t think we need to go into all the hubbub about machine learning, but lets talk about some of the open source libraries out there from various companies.

We’ve got Tensor Flow right up there as easily the number one and then Scikit Learn, Theano and Keras are the other ones. There’s Torch, a few other ones, but the one library that’s easily number one is Tensor Flow from Google. I put up another article where it was something like 80% of the … It’s a huge number of people that use Tensor Flow versus other libraries as I’ve just mentioned. It’s open source. It’s done in C Plus Plus, but it’s heavily interfaced with Python.

There’s Theano, which is another alternative. I think it’s a little older. It’s easier to use as far as I know and it’s just not growing as fast because Tensor Flow is pretty cryptic when it comes to the working of the coding front end of it. I still want to do a course on it. I just posted a standard course found on Coursera using, I think it was MatLab and Octave. We also have Theano, which is a mature library, but I think this is dropping off.

Moving onto other, there’s Torch from Facebook, it’s Lua. It’s kind of smart how it’s done, but there is an interface with Python and as I said, Python is a standard way to go about doing machine learning.

Scikit is another one. That’s fairly old as well. I think it was done 100% in Python. Unfortunately, that seems to be dying off. I know Apple’s got a few. I don’t really think that’ll take off as long as Google and Tensor Flow have pretty well entrenched the whole market for machine learning libraries and frameworks.

There’s the other one called ‘Caffe, Caffe Two’. I’m not even going to mention that. I don’t think it’s worth it. There is Apple coming out, but I really think that the … Swift is getting popular, but more on the back end. I just don’t see a Swift any of the Apple technologies picking up where Google Tensor Flow is at.

There’s Keras as well, which is built on top of Tensor Flow. It’s more for an easier way to interface with Tensor Flow, but all in all I think Tensor Flow is pretty well the standard and will be the standard for a while. We haven’t even talked about the Google Deep Mind, which is another project, which seems to be growing. I’m not sure if that is built upon the Tensor Flow, but apparently that’s getting big too. That’s going to be like the equivalent of the next generation.

Those are all the current machine learning libraries out there, but if you want, if you’re a betting guy and you want to bet the future, yeah, Tensor Flow seems to be the one to go with. Hope that’ll help you out.

I have made available my questionnaire for those who are seeking one on one help in algo or automated trading. Please find this Word Document to download here:

 

 

https://quantlabs.net/blog/2017/11/one-on-one-questionnaire-for-algo-or-automated-trading-help/

 

You can always answer this which you can by attach to respond to this email or at support@quantlabs.zendesk.com.

 

You can also watch these videos to understand why this is being offered:

 

https://www.youtube.com/watch?v=HaCrh2puSwg

 

You can find more details on reasoning for this questionnaire here:

 

https://quantlabs.net/blog/2017/11/one-on-one-questionnaire-for-algo-or-automated-trading-help/

 

Thanks Bryan  

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Is Google TensorFlow the right machine learning framework to go with for algo trading

Is Google TensorFlow the right machine learning framework to go with for algo trading

The video will try to explain this as compared to others

https://www.kdnuggets.com/2017/11/choosing-open-source-machine-learning-library.html/2

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Another Backtesting and live-trading framework: F4

Another Backtesting and live-trading framework: F4

This looks really good but I think I may just stick to the path I am on with Backtrader. This does fit a lot of my needs but this was sent over.

 

Hi Bryan,

I just wanted to chime in with another potential software solution for automated FX trading; the F4 framework developed by Asirikuy (https://asirikuy.com/newsite/). It’s paid open-source and costs 394 USD for the first year, and 194 USD for each year thereafter (although you would only have to pay for the first year if you just want access to the code).
In my opinion, it is without a doubt the most advanced FX trading framework available to retail traders. Here are some of the advantages:
  • The only framework that simulates swap charges in backtests using historical interest rates.
  • The only framework that refactors the market data for different time zones. This is a huge problem with other FX trading platforms, but nobody seems to realise it. Different brokers structure their market data in different ways according to different to time zones, which means that strategies developed for one broker may have much worse performance on another broker. The F4 framework takes care of this automatically and ensures that the results are reliable no matter what data source/broker you are using.
  • The majority of the core framework is written in C (with some modules in C++), which of course means it’s extremely fast. The framework is compiled into a dynamic library that is then loaded into various front-ends. For example, there is a Python front-end called the ‘NST’ which facilitates backtesting, and there is another Python front-end called ‘The Asirikuy Trader’ which, unsurprisingly, allows you to connect to various brokers for live trading. You can even call the library from Metatrader 4 (and possibly 5). I’m not sure why you’d want to (I think MT4 is terrible), but at least it’s an option.
  • On the topic of brokers, you can hook into either the Oanda v20 API or the Dukascopy JForex API. Both of these are already implemented.
  • It ships with an extensive machine learning library based on Shark (http://image.diku.dk/shark/), which allows you to trade a huge variety of ready-made ML strategies, or you can of course code your own into the framework. Asirikuy does a lot of research into supervised learning and reinforcement learning; the forum contains loads of useful information in that regard.
  • With the membership you get access to 1 minute data for 21 currency pairs going back to December 1986. This data is from a company that provides data to brokers. It is not usually available to retail traders, but Daniel (who runs the website) has negotiated a deal for the community since his friend works there. This data is updated every weekend and, in my opinion, justifies the 194 USD per year all by itself.
  • Multithreaded simulations using OpenMP.
  • Multithreaded live trading.
  • Multi-node optimizations using MPI.
  • Brute-force and genetic optimization of strategy parameters.
  • There are quite a few more advantages (like GPU data mining software, a variety of portfolio optimization and analysis techniques), but I don’t want to waste any more of your time 🙂
There are a few disadvantages:
  • It is a pain in the neck to install. It’s fine once it’s up and running, but it can take a while to get all of the dependencies installed. That being said, the customer support offered by Daniel is the best I have experienced anywhere. He will do anything and everything to help you out, and he usually responds in a matter of hours.
  • From your videos I know that you’re interested in using Python for your actual strategy logic. Strategies in F4 are usually coded in C/C++. However, there is a member that has apparently embedded Python within the framework, so I’m sure you could get it working if you wanted to. Of course, you have all of the source code as well, so you can implement any functionality that you want.
I’d just like to say that I’m not affiliated with Asirikuy in any way, other than being a member. I use a private framework for my equity/ETF strategies, but I use F4 for all of my FX trading. There are some Asirikuy members who are interested in asset classes besides FX, so it may be possible to use F4 for stock/ETF strategies as well in the future. If you want to find out a bit more about the kind of stuff they do at Asirikuy, the founder also runs a blog (http://mechanicalforex.com/). He’s a very knowledgeable guy (a chemistry PhD), and has an interesting insight into quant trading.
Hopefully the above is useful in some way 🙂
All the best,
James
And I forgot to mention that the framework includes functions to download fundamental data from Quandl, such as COT reports etc.
http://mechanicalforex.com/2014/02/the-f4-programming-framework-and-asirikuy-tester-a-simple-faq.html

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Best back testing framework for algo trading in Python

Best back testing framework for algo trading in Python

 

This is more useful for portfolio optimization

https://github.com/pmorissette/bt

https://github.com/mementum/backtrader

https://www.backtrader.com/docu/quickstart/quickstart.html#using-the-platform

https://github.com/quantopian/zipline

The Efficient Frontier: Markowitz portfolio optimization in Python

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!