Tag Archives: STL

Does this article hint DOTNet C Sharp could be as fast as C++ with STL for quant and HFT trading platform development?

Hi there

I was surprised when I say this:

Does this article hint that DOTNet C Sharp could be as fast as C++ with STL for quant and HFT trading platform development? – See more at: https://quantlabs.net/blog/2013/12/does-this-article-hint-that-dotnet-c-sharp-could-be-as-fast-as-c-with-stl-for-quant-and-hft-trading-platform-development/#sthash.WBmhwGda.dpuf

Depending on your libraries, C++ could slow down your development time if you have bloated libraries. C# could make it easier.

Did you you know my current workshop on showing you how to develop an automated trading system in C#? It even comes with source code. Get the entire schedule here.

I have dozens of coding samples in C#, C++, R, Matlab, and even more! Learn how to trade with programming in my QuantLabs.net Premium Membership

GET INSTANT ACCESS HERE

Of course this will not last forever as I am removing all PUBLIC ACCESS after Jan 6 forever,

See  some extra info listed here!

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!

Does this article hint that DOTNet C Sharp could be as fast as C++ with STL for quant and HFT trading platform development?

Does this article hint that DOTNet C Sharp could be as fast as C++ with STL for quant and HFT trading platform development?

http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET

Just wondering so let me know what you think.

Join me on launching a quant trading business with these technologies 

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!

Potential risk management data intensive at bank with: C++, C#, STL, Condor, Symphony, Gemstone Gemfire, Grid Computing for HPC needs

Potential risk management data intensive at bank with: C++, C#, STL, Condor, Symphony, Gemstone Gemfire, Grid Computing for HPC needs

From a recruiter sent:  (Please don’t ask who it was or where this posting is from), I am just highlighting some skill needs you may want to think about

The reason for m email is that my client, a tier 1 investment bank, is on the lookout for a highly technical C++ developer to work within the front office trade capture desk.

This position will be responsible for analysis, design and development of trading/risk system components, encompassing front-to-back functionality for various parts of front-office business areas. Development will be undertaken predominantly using C++ Windows, STL and some C#.

This is a permanent opportunity, based in London.

In this role, technical expertise of C++ windows and some C# understanding are both extremely important. (Though they are also considering developers from outside of banking as well!). You will be working extensively with front office developers and quants and learning from some of the industries finest!

This is a technically exciting position as you will be designing and developing trading applications using C++ and c# technologies. The ideal candidate will have worked strong C++ windows skills and some working knowledge of C#. Business knowledge is not required for this is a role which you will learn Grid Computing, there is also a high emphasis on vendor products for example Platform Symphony, Gemstone GemFire and Condor.

To be considered for this position you must have:

– C++ Windows, STL and COM
– C# (Advantageous)
– Grid computing or vendor products knowledge.

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!

Here is a complete C++ STL container cheat sheet. How Java collections and generics evolve from C++

Here is a complete C++ STL container cheat sheet. How Java collections and generics evolve from C++

This took a bit of time to compile. There is really not a lot of cheat sheets out there for STL (Standard Template Library) but this is over 65 pages. This shows how complex and involved the Standard Template Library is. It is a whole another world in terms of new library (or framework), my online document may help.
As for a Java comparison, you can see where it gets many of its collection and generic functionality from. Although Java has evolved into more advanced concepts in this area, C++ uses the primitive collection types which of course include vector and list. Nothing fancy in C++ but does remove a lot of complexity Java brings with their four collection interfaces and the further break down of each.
Sorry but this is the overwhelming component of Java which I do not like. C++’s standard template library (STL) is complex but is brings less choice. Less choice obviously means less complexity. There are some genius features in Java, but I still find it overwhelming. If you really want to see some intelligence, I would point you over the Boost library where you might find some innovative ideas that Java does not bring to the table. This does not mean I hate or dislike Java. I really like Java but as said, I just find with the less choices of C++, it makes a developer’s life easy (I would think).

As you know, each project or application has its own needs. Both Java and C++ has it place. Here is how I see it. If you need a fast, desktop application, use C++. If you need a library or compiler, use C++. If you want anything web based with portability and scalability, use Java. Neither really is better or worse, just different needs.
Here is my download link for that C++ doc. I need to mention a lot of this is sourced from Scott Meyer’s Effective STL, cplusplus.com, and Wikipedia.

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!

How to convert string to double dollars using C++ string stream, a STL container, and locale

How to convert string to double dollars using C++ string stream, STL containers, and locale

#include
#include
#include
#include
#include

using namespace std;

void to_dollar(int a);

int my_number_format(int num)
{
int idx;
char buffer[64];

idx = sizeof(buffer)-1;
buffer[idx–] = 0; // end zero

int count = 0;
while (num > 0) {
if (0 == idx)
return -1;
if (count > 2) {
buffer[idx–] = ‘,’;
if (0 == idx)
return -1;
count = 0;
}
count++;
buffer[idx–] = ‘0’+(num % 10);
num /= 10;
}

buffer[idx] = ‘$’; // currency sign
return printf(“%s\n”, &buffer[idx]);
}

int main()
{
int userInput;

cout << "Please enter an integer-:> ” << endl; cin >> userInput;
int result;
result=my_number_format(userInput);
return (0);
}

void to_dollar(int a)
{
stringstream inString;
string strTemp;
long double intTemp;

inString << a; // convert integer to string for easier handling inString.str(inString.str()+"00"); // concatenate two zeos to denote currency fractional digits inString >> intTemp; // convert back to integer

locale loc(“english_USA”); // set the locale
cout.imbue(loc);

cout.setf(cout.flags() | ios::showbase); // turn on currency sign printing
const money_put& m_put = use_facet >(loc); // get the money_put facet
m_put.put(cout, false, cout, ‘ ‘, intTemp); // show me the money. Note to use fractionally adjusted value.
cout << endl; }

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++ STL containers including differences of list vs vector

C++ STL containers including differences of list vs vector
Vector –
1> Insertion – O(n) /* Resizing the array */
2> Search – O(n) /* Sequential */ , O(logn ) /* Binary */
3> Random Access – Yes .
4> Deletion – O(n) /* Shifting & Resizing */
5> Sequential Memory used .

List –
1> Insertion – O(1)
2> Search – O(n)
3> Deletion – O(n)
4> Random Access – No
5> Linked allocation , hence more memory efficient
The above are known as containers found in the Standard Temple Library (STL) They also contain predefined behaviour and are well known interfaces.
Below is a C++ source example of a list:
// Standard Template Library example

#include
#include using namespace std;

// Simple example uses type int

int main()
{
list L;
L.push_back(0); // Insert a new element at the end
L.push_front(0); // Insert a new element at the beginning
L.insert(++L.begin(),2); // Insert “2” before position of first argument
// (Place before second argument)
L.push_back(5);
L.push_back(6);

list::iterator i;

cout << "before remove" <
#include

using namespace std;

main()
{
vector< vector > vI2Matrix; // Declare two dimensional array
vector A, B;
vector< vector >::iterator iter_ii;
vector::iterator iter_jj;

A.push_back(10);
A.push_back(20);
A.push_back(30);
B.push_back(100);
B.push_back(200);
B.push_back(300);

vI2Matrix.push_back(A);
vI2Matrix.push_back(B);

cout << endl << "Using Iterator:" << endl; for(iter_ii=vI2Matrix.begin(); iter_ii!=vI2Matrix.end(); iter_ii++) { for(iter_jj=(*iter_ii).begin(); iter_jj!=(*iter_ii).end(); iter_jj++) { cout << *iter_jj << endl; } } } Need finer detail of this with examples of map and multimap!!

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 STL containers like vector and list

C++ interview questions on STL containers like vector and list

Containers:
vector and list difference. complexities of alogrithms.

Vector –
1> Insertion – O(n) /* Resizing the array */
2> Search – O(n) /* Sequential */ , O(logn ) /* Binary */
3> Random Access – Yes .
4> Deletion – O(n) /* Shifting & Resizing */
5> Sequential Memory used .

List –
1> Insertion – O(1)
2> Search – O(n)
3> Deletion – O(n)
4> Random Access – No
5> Linked allocation , hence more memory efficient .
Reply to Comment
Anonymous on April 10, 2010 |Edit | Edit

For list, the complexity of deletion should be O(1).
3> Deletion – O(1)

What is a container class? What are the types of container classes?
A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory. When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container.
how to delete a node in a list
single linked list ? – then save pointer to next node, start from head and go to the node right before the node being deleted, and change it’s “next” pointer to the one you saved.
Now you can delete node.
double linked list ? – no need to start from head, just reassign pointers in neighbor nodes properly to point to each other instead of to the node being deleted, and then delete the node. Of course, special care for first and last nodes, which have some NULL pointers.

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!