Tag Archives: dotnet

Who is up to coding up this Karen options trading strategy in DotNet C# C++ or Matlab

 

Here are some popular postings from yesterday flurry of activity.

Who is up to coding up this Karen options trading strategy in DotNet C sharp CPP or Matlab

https://quantlabs.net/blog/2013/08/who-is-up-to-coding-up-this-karen-options-trading-strategy-in-dotnet-c-sharp-cpp-or-matlab/

This is an important one as I want to start developing trading strategies in parallel so I am looking for someone to step up.

Does DotNet F Sharp and RX Railway oriented programming still have any validity in the world of quant, HFT and trading?

https://quantlabs.net/blog/2013/08/does-dotnet-f-sharp-and-rx-railway-oriented-programming-still-have-any-validity-in-the-world-of-quant-hft-and-trading/

I am surprised this .NET language still has an interest.

This is why I don’t like to hire third party programmers to steal your source code for your HFT automated trading platform

 

I have started custom coding my first proprietary trading strategy for options. It has been promised to have amazing daily returns but I am not sharing this one. Sorry.  I have another one in the pipeline for index funds so let’s see what happens with that. I am looking at other self-contained programs with interesting charting and an internal tick database which even predicts profitability.

If proven, these will be part of my upcoming trading platform. They will also add immense value to my high speed automated trading system as well

–> GET ACCESS NOW TO SOME OF MY PLATFORM TRADE SECRETS <–

There are many more Membership benefits listed here!

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!

DOTNET CSharp used by a Toronto quant?

How much DOTNET CSharp used by a Toronto quant?

I got this response from a newsletter subscriber

Hi Bryan,
Please tell me, is C# more used by Toronto quants or C++?
Best regards.
I have no idea but it seems .NET is heavily used along with Java in legacy enterprise. I do .NET is used throughout banks for front end system. After that, I have know idea.
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!

C++ scenario for DotNet CSharp programmers

C++  scenario for DotNet CSharp programmers

You know typical scenarios sent from someone on my Skype

Join my FREE newsletter to learn more about how I accomplish this hand coding with Redis and the trading model (I already done that remember?)

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 DOTNET CSharp 6 features demo

New DOTNET CSharp 6 features demo

This look interesting but I have moved on. Good language for newbies of course

http://www.codeproject.com/Tips/1023426/Whats-New-in-Csharp

What would happen if you found a way to analyse the markets to confirm your trading ideas? 

Join my FREE newsletter to learn how I am building that exact system 

 

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!

DOTNET CSharp most popular programming language at work

DOTNET CSharp most popular programming language at work

Just so you know as I have turned my back on this

SD Times Blog: C# is the most used programming language at work

Join my FREE newsletter to see which languages and tools I now focus on for automated trading

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!

Calling R file from DOTNET c# ?

Calling R file from DOTNET c# ?

I got this through my contact form

Hi I am trying to call R file from C#. However neither I am I getting any error nor R is getting called. Stuck for last 4 days . Please help

Anyone have any experience with the lastest ‘fun’ with R.NET

UPDATE BELOW

Join my FREE newsletter if you want to learn other cool tricks with R 

More from this dude:

 

I have done exactly like this. However I have to call a .R file from c#. Can you provide me reference for that? Or could you please take an look at my code? I  am using rdotnet and r version 2.14.1. I have added reference rdotnet in my project under solution explorer.

c#code
—————-

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RDotNet;
using RDotNet.Devices;
using RDotNet.Internals;

 

 namespace EmbeddAssembly
{
    class Program
    {
        static void Main(string[] args)
        {

            string rhome = System.Environment.GetEnvironmentVariable("R_HOME");
            if (string.IsNullOrEmpty(rhome))
                rhome = @"C:\Program Files\R\R-2.14.1";

            System.Environment.SetEnvironmentVariable("R_HOME", rhome);
            System.Environment.SetEnvironmentVariable("PATH", System.Environment.GetEnvironmentVariable("PATH") + ";" + rhome + @"binx64");

            // Set the folder in which R.dll locates.
           
            REngine.SetDllDirectory(@"C:\Program Files\R\R-2.14.1\bin\x64");

           // REngine e = REngine.CreateInstance("test", new[] { "" });
            using (REngine engine = REngine.CreateInstance("RDotNet", new[] { "-q" }))  // quiet mode
            {

                foreach (string path in engine.EagerEvaluate(".libPaths()").AsCharacter())
                {
                    Console.WriteLine(path);
                }
                engine.Evaluate(".libPaths('C:/Program Files/R/R-2.14.1/library')");
                engine.Evaluate("source('C:/Users/Documents/Visual Studio 2010/Projects/EmbeddAssembly/multi.r')");
                Console.ReadLine();
            }
        }
    }
}

Inside multi.r I am fetching data from few tables by hitting database and writing into an empty table.
The .r file works fine when used in R studio. However I am not able to do so by calling multi.r file from 

C#.

I really need your help.
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!

DOTNET Performance Tuning Tips

.NET Performance Tuning Tips

1) Pre-complier NGEN install myapp.exe
2) Use Value types (no heap memory)
3) Rewrite (overload) methods so that they don’t use boxing or refection
4) Use Generic Collections to avoid boxing/unboxing costs
5) Use fastest JIP compiler, RyuJit > JIT64 , use RyuJit for faster compilation time
6) MPGO (Managed Profile Guided Optimization) Improves precompiled assemblies’ disk layout- Optimize code and data positions on disk
7) Improve Cold Startup I/O time,- ILMerge , merge dlls with .exe into a new .exe file
8) Improve Cold Startup I/O time – Executable packers – compress assemblies so that they take less to load – RugLand packer (RPX , codeplex)
9) Improve Cold Startup I/O time – Place Strong –named assemblies in the GAC so that the CLR can skip the assembly verification checks.
10) Improve Cold Startup I/O time – Windows SuperFetch – Pre-Fetch code and data that it thinks your app will need.
11) Precompile serialization assemblies – SGen.exe
12) Precompile Regexes
13) Use Unsafe code – Pointers and Memory pinning to avoid garbage collection
14) Hand rolled memory copy methods using pointers – sometimes it’s faster for certain array sizes.
15) Use Dynamic code to construct dynamic unsafe generic methods and classes
using pointers and IL code.
16) Use array storage for speed and low memory usage
17) Use LIST<T> , as a dynamic resizable array , but only use it with append to add data to the end of the array, other insertions will cause a full copy of the array when it runs out of current space and needs to resize.
18) Use SortedDictionary<K,V> or SortedSET<T> for fast searching, needs a lot of memory.
19) USE Hashing with Associative Collections. Dictionary<K,V> and HASHSET<T> provide O(1) insert, delete, and lookups, but will need time to reorganize if you make a lot of changes to them. CANNOT SORT BY KEY AND HAS BIG MEMORY OVERHEAD.
20) Data Parallelism
21) Asynchronous I/O and Asynchronous Parallelism – Asynchronous file read, Asynchronous HTTP Post, Wait for all tasks to complete, Wait for first task to complete
22) Get rid of high level synchronization locks by replacing with low level atomic synchronization primitives (using hardware-based inter-lock compare exchange exposed by C#) – used by Concurrent Stack and Concurrent Bag

23) Aggregation – Instead of locks, use smaller unlocked sub-tasks and the re-combine all the outputs when the last sub-task is finished. Basically collect intermediate results into thread-local structures. Only need synchronization when combining thread-local outputs into one global output.
24) Use Atomic hardware primitives: Interlocked.Increment, Interlocked.Decrement, Interlocked.Add etc..
25) Parallel Loops for CPU Bound Workloads, Tasks, Async, and Wait for I/O Bound Workloads.

This is from the NYC Contact but I am unsure of his source for this

Join my FREE newsletter to see how do my development for algo trading 

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!

DOTNET Parallel Artificial Neural Networks

Parallel Artificial Neural Networks in .NET

Is this possible? .NET is back?

I am sure there is something out there done in other non Microsoft technologies (don’t worry I am sticking to my plan)

http://www.codeproject.com/Articles/1016734/Parallel-Artificial-Neural-Networks-in-NET-Frame

Join my FREE newsletter to learn more about neural networks for trading 

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!

Java vs DotNet CSharp

Java vs DotNet CSharp

What others say on this where there are some valid points

http://www.codeproject.com/Lounge.aspx?msg=5092872#xx5092872xx

Join my FREE newsletter to learn more about which programming language I use for automate trading 

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!