Tag Archives: multithreading

Intel TBB Flow Graph dfor rapid multithreading development of High Speed Trading

Intel TBB Flow Graph dfor rapid multithreading development of High Speed Trading

This could be useful GUI utility for some to generate Stub C++ code
Note that this runs on WIndows UGH
https://www.youtube.com/watch?v=m8V9weR7Uwc

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!

C++ multithreading much easier now

 

C++ multithreading much easier now

Read this use the std (standard_ since C++ v 11. http://stackoverflow.com/questions/266168/simple-example-of-threading-in-c

http://www.cplusplus.com/reference/thread/thread/

So why use PThread now? http://www.tutorialspoint.com/cplusplus/cpp_multithreading.htm

Should virtual functiosn be used here?  http://www.cplusplus.com/doc/tutorial/polymorphism/

Join my FREE newsletter to learn which C++ tricks are used for high frequency trading 

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!

TBB vs Fastflow for C++ parallel multithreading? Next steps for you

I have posted a detail series of next step I intend to take with deploying a live trading systematic model using code generation from Matlab Simulink to hopefully a fully automated trading C++ enabled system.
TBB vs Fastflow for C++ parallel multithreading? Next steps

 

Yes I have come down to the selection of C++ with Matlab to enable this deployment with Oanda as the chosen broker for simple forex trading!

Read more here 

TBB vs Fastflow for C++ parallel multithreading? Next steps

TBB vs Fastflow for C++ parallel multithreading? Next steps

Don’t forget about my next non trading techie talk. I like to open this up to retail traders:

Let’s talk non techie trading stuff MEETUP

Monday, May 11, 2015

7:00 PM

I got some non techie trading ideas I want to talk about. Let’s do that to share your investment ideas.

Let’s talk non techie trading stuff MEETUP

Login Details here:

1.  Please join my meeting, May 11, 2015 at 7:00 PM Eastern Daylight Time.

https://global.gotomeeting.com/join/450975573

2.  Use your microphone and speakers (VoIP) – a headset is recommended.  Or, call in using your telephone.

Dial +1 (224) 501-3212

Access Code: 450-975-573

Audio PIN: Shown after joining the meeting

Meeting ID: 450-975-573

GoToMeeting®

Online Meetings Made Easy®

Not at your computer? Click the link to join this meeting from your iPhone®, iPad®, Android® or Windows Phone® device via the GoToMeeting app.

Let’s end this email here so thanks for reading

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!

Youtube video demo on Inline assembly with c or c++ with spinlock multithreading for lowest latency HFT system

Youtube video demo on using inline assembly within c or c++ and spinlock for multithreading for lowest latency possible in a HFT system

Want to learn more? Join my FREE newsletter to get daily info

http://www.codeproject.com/Articles/15971/Using-Inline-Assembly-in-C-C

http://stackoverflow.com/questions/11959374/fastest-inline-assembly-spinlock

http://stackoverflow.com/questions/1456225/spinlocks-how-much-useful-are-they?rq=1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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!

I can confirm FastFlow v2 does have a NVIDIA CUDA C++ GPU example for multithreading

I can confirm FastFlow v2 does have a NVIDIA CUDA C++ GPU example for multithreading

Download from and follow instructions at:

http://sourceforge.net/scm/?type=svn&group_id=282605

Question is if this is a stable release?

Find out what I plan to do with this thing in my upcoming high frequency trading platform 

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!

Exciting developments for my HFT platform with 30 min video overview of CUDA support for new multithreading C++ library

Hi there

Just in the last 24 hours:

1. I sent an email to QuantLabs.net Premium Membership about the progress of my HFT (high frequency trading) platform. I will be hosting a PRIVATE webinar on the progress. You can only get access to it by being a member so you would need to join.

Here is that email sent.

2. I made a 30 minute overview of my thoughts on this exciting multithreading C++ library I discovered. The next version appears to  support for FPGA, CUDA, GPU, etc.

3. I also posted a video from last night’s webinar on the latest historical database service called TAQTIQA.

SO, is there any more I need to say?

–>. You know what to do if you want to get into the exciting next generation in trading? <–

Got questions or comments, let me know.

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!

LMAX has a unique Java disruptor for multithreading latency for quant development. Now C++ and C# versions exists

LMAX has a unique Java disruptor for multithreading latency for quant development. Now C++ and C# versions exists

Here the links you should know about this:

http://stackoverflow.com/questions/6943569/lmaxs-disruptor-pattern-is-there-a-port-to-c

http://www.2robots.com/2011/08/13/a-c-disruptor/

From LMAX In Java:

http://code.google.com/p/disruptor/

C++ version:

http://code.google.com/p/disruptor-cpp/

 

http://www.infoq.com/presentations/LMAX

 

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!

Simplest C++ Multithreading with Thread classes, mutex, set, wait, lock, unlock defined

Simplest C++ Multithreading with Thread classes, mutex, set, wait, lock, unlock defined

I have searched high and low for the best and simplest multi threading explained within C++. As you know, I have already posted some articles on Linux processes and how deadlocks work. Theoretically, we are trying to prevent the Dead Diamond of Death syndrome. Both Java and C++ have potential solutions but Java has all these features built in natively. C++ needs a new set of classes defined which includes a specialized Thread class.
Using a set of mutex method, we can lock certain processes from subsequent messing up the state of a current thread. An example of mutex locking a storage block of code, look at:
int g_iStorage = 0;
CMutexClass MyMutex;

void StoreValue( int *pInt )
{
MyMutex.Lock(); //the gate keeper. only one thread
//allowed in at a time

g_iStorage = *pInt; //protected data, critical code section

MyMutex.Unlock(); //unblocks, allowing another thread to
//access g_iStorage

}

There are some other methods which work the same way Java’s Threading class and methods. These methods are explained below:
void Set() Sets an event state to signaled, notifying the blocked thread.
BOOL Wait() Places the calling thread in a blocked state until the event state is set to signaled. Returns TRUE on success, FALSE on failure.
void Reset() Resets a signaled event to unsignaled.
event object being used by a receiving thread::
CEventClass event;
.
.
//thread code

.
.
while(bContinueRunning)
{

event.Wait(); // wait for an event to occur

// perform some task

.
.
event.Reset(); // reset the event to un-signaled

}
.
.
Example of an event object used by one thread signaling another:
EventClass event;
.
.
// change some data

.
.
event.Set(); // notify thread that an event has occured,

// set event to signaled

There is more detailed info you could go into. I do believe if you know enough of above, you should be able to show some rudimentary knowledge in multithreading within C++. I would recommend following through with the link below as it is fairly close representation of how Java works.
To download and better understand how all this Thread classes work, go to http://www.codeproject.com/KB/threads/threadobject.aspx
It also contains a very good end to end set of source files to generate your own Thread classes which include the mutexes explained.

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!

c++ interview questions on XML, quant, and multithreading

XML
You have to manually parse HTTP call whereas SOAP library parses the XML for you and provides methods to get the header and body information.
Quant based:
Describe a CDS to a layman.

What is Z spread?

Difference between a forward and a future?”
Find the error code sample:
Find the error and fill in the blanks, what is the output?
i=0;
i++ || ++i || i–;
printf(“%d\n”,i);
by Scofield:
i++ and I — negate each other, so ++i
i =1
i == 2

i++ is post-increment, when the first operator || gets the value it will still be zero.
++i is pre-increment, so the second operator || will get 2
The || operator will shortcut with:
0 || 2

so the final ++i will not be executed.
Multithreading:
How can you lock a portion of a file and how to use it ?
man -S 2 fcntl

The lockf() function shall lock sections of a file with advisory-mode locks. Calls to lockf() from other threads which attempt to lock the locked file section shall either return an error value or block until the section becomes unlocked.

Say you have a multithreaded network I/O bound server that is single-threaded, under a load of tens of thousands of connections. What is the most expensive operation encountered in processing data, and how would you minimize the impact of the operation?
The most expensive operation is the read from the network socket. You would minimize its impact by using non-blocking sockets and reading as much as you could in one go; this would allow a minimal number of read operations to obtain the contents of the stream.

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!