Tag Archives: answers

Questions and answers new to forex trading

Questions and answer for jan 8

Please note that my time is highly limited. I am definitely scaling back on this Q&A as  I can only respond to people behind my paywall.

Queries from various sources with references below:

Hi Bryan Would you talk a little about automated arbitrage trading? What tools eg Dokascopy can setup rules for triangular arbitrage? And what if any tools exist for crypto currency arbitrage? Also, related to arbitrage, can you talk a bit about the mechanics of inter-exchange arbitrage trades? Do these tools move money between accounts to trade on different exchanges? Or are you limited to the trading pairs offered by a single broker? Thanks in advance!

I am hitting a “reservation for  python” link..

http://quantlabs.net/courses

 Oh no, there are other links to. https://quantlabs.store/collections/videos/products/interative-brokers-4-5-hour-workshop-bootcamp

Happy new year! I just RSVP’d for tomorrow’s meetup. Just to let you know I went over the JForex tutorials from DukasCopy, and also couple of your Intro from the playlist, as well the manual. We can probably chat tomorrow more in person but here is my feedback:

All these tutorials delve straight into the technical part of the platform without a proper Intro or overview. I am not able to see the flow or get the full picture from start to end.

Like do I need to decide on a currency pair first before connecting with JForex or would the strategy I build will determine the best currency pair to select?

I am new to Forex trading and have been going through other Intro tutorials on youtube. Right now I don’t know how to start or know which strategy to use or build. All these tutorials seem to assume that users are knowledgeable in Forex trading, is that right?

 I wouldn’t mind buying your Visual JForex tutorials if it helps newbies like me totally new to  Forex trading and strategies. Or do you recommend any other Forex tutorials I should go through before using DukasCopy?


——

https://www.youtube.com/watch?v=gb9G9pLEk1M&feature=em-comments

Complete newb to terminal – can you provide clearer instructions for installing? When I paste; git clone git://github.com/askmike/gekko.git into a new Terminal window it says “requires the command line developer tools”. Do I need to install something else before installing Gekko? I already installed nodejs as directed on the github page

https://www.youtube.com/watch?v=Bn2p-nkbVdE&lc=z23njraweobixxbnyacdp4330tahl01mqppsaarnl45w03c010c.1515343971113738&feature=em-comments———–

Well the big difference between ccxt and the others is tha ccxt is not a bot by itself. And also Blackbird is a special bot for doing arbitrage on different markets (that’s why it does not support so many exchanges). But I agree in how great ccxt is.

REPLY

1

IB is a great exchange. Their API is pretty straight forward. I was
thinking about FX and crypto. FX has small % changes that are highly
leveraged, which means more randomness and less profit, with the potential
for devastating losses. Crypto is a bullish sector where you could have
literally bought anything and made triple digit returns in the last 6
months. And with no leverage, so losses are restricted to each trade and
at worst you might have a 66% loss of one trade, but the upside is a
multiple of the loss potential in most cases. This skews the probability
distribution in a way that makes profit less risky. You can ask your quant
PhD about that, but pretty sure that is the case. I feel like my trades
have room to fly, and less likely to crash and take out my account along
with them. Leveraged trades drag down your account if they go south. My
trades are all 1:1 so they don’t affect my account outside of the trade
itself, and is very unlikely to go to 0. The gains can be 100% in a day,
which would be similar to a 100:1 leverage in FX, but without the downside
of losing more than the trade if it goes against you. And again, worst
case would be 50 or 60% loss maybe of just that one trade amount. Of
course you can adjust to your risk appetite. Just sayin, buddy, this is a
hot sector. For now. I am sure the US Gov deep state and banksters will
find a way to rob the people eventually.

Bryan Downing

Bryan Downing

4 days ago

that is correct about ccxd not being a bot but is a framework

REPLY—


Is this S & P Trading futures or Day Trading/Swing Trading? Like to be
part of it?

/>
Virus-free.www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
www.avg.com
www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail/>

REFERENCES:

 

https://quantlabs.store

 

Minimize loss with linear regression for algo forex 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!

Answers for DIY trading with automation algo and Python programming technology

Answers for DIY trading with automation algo and Python programming technology

From a recent group head I presented to a few years ago:

Hi Bryan,

You probably won’t remember me, but we met briefly when you did a presentation for the xx.  I believe the Chapter Head, xx, invited you to speak with our group

Myself and a few others from a systems development meetup are on the path to wanting to automate some trading strategies.  I’m/we’re looking at 2 options –

1) do it yourself / DIY

2) pay someone to fully implement system ideas

On point # 1), I was looking at python and an Ibridgepy for Interactive Brokers as a possible solution.  Just wondering if you could provide some advice on software / languages and setups to use for automating stock (and possibly option) trading.  Ideally it would be nice to choose from a universe of tickers and rank the signals generated by relative strength or some other ranking to give priority to certain stocks to trade over others.  I’m personally more interested in swing trading and trend following versus high frequency or intraday stuff (xxx that I’ve copied on this email is more interested in intraday).  An guidance or direction on platforms/software/technology to focus on, would be much appreciated.

On point # 2), what type of budget pricing should I expect for someone qualified to implement a fairly simple system from soup to nuts (based on rules any way), and, can you recommend some people I could talk to that specialize in this?

I noticed your site offers a premium subscription… does your subscription have archives and ongoing content for the DIYer?  What is your subscription cost/and options?

Thank you.

Where are you located, and, would you be interested in coming out to speak at a local trading meeting Meetings average anywhere from 10-25 people, on average, depending on the level of interest from members.

Regards,

 

Here is a video response

 

 

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!

Answers to a Deficient trading database query

Answers to a Deficient trading database query

I sent out my trading database with a mention in a recent Meetup webinar I hosted. A query came up from a Meetup follower:

I reviewed your test database and I have few comments.
1) have you considered normalizing the various security tables into a single table? The benefit will be realized once you need to deal with a common object which contains multiple instrument/security type. for example portfolio table. I have the design and I can send you the high level schema.
First, as I mentioned in my Meetup, this database is a lazy quick & dirty way to implement something to get it working so keep that in mind. I have seen quite a number of database schemas but please send it out.
2) How do you deal with the variety of tickers assigned to the same security. Example: Google or Yahoo can assign different ticker to the same index.
The best way to treat each security in its own table for optimal performance
3) can you point me o a sample code which provide new ticker for IPO.  Currently I use a process which inserts into the database new tickers only at the End of trading day. This is done only once my program realizes that a new ticker is in the daily feed, but does not exist in the ticker list.   I prefer to be pre-emptive and detect IPO ahead of time, not after the fact.
These are hard to find. As mentioned, I would think maybe IQFeed has it in their news where you need to filter. I am sure there maybe there are some online databases if you search via Google.
You mentioned that IB is providing such an IPO feed.  However, I’m looking for a free feed.
Thanks to him for asking
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!

Request of tech answers for Apple Mac OSX for Python R Java 8 CPP Erlang Scala, quant trading research and HFT consulting needs

Request of tech answers for Apple Mac OSX for Python R Java 8 CPP Erlang Scala, quant trading research  and HFT consulting needs

Thanks to all on Twitter and other social media!

After dropping into a local Apple store, I fell love in again with their hardware and most of all service!!

I played with all the hardware from the latest Macbook to Imacs with the usual mobile devices from Apple. I started thinking about my future with why is everyone on Apple. It reminded why when i was a Mac head addicst 10 years ago.

Also, talking to others in learning about ‘newer’ languages like Scala amd Erlang, you kind of find out why they are gaining in popularity. Also with a recent comment on maybe just maybe, Python maybe eay  to finally install so here are some questions:

Ok enough of that stuff, here are some tech requests:

1a. What is your idea IDE (integrated development environment) for Python ? I like Sypder 2 but found it chokes on package management. Please tell me what you tuse as IDE for Mac OSX

b. Anyone using either Xcode or Eclipse for any languages? Which ones?

2. Is anyone integrating R and Python together for trading operation means (ie. trading execution to brokers)

3. What is your ideal C or C++ IDE for Mac OSX? Code::Blocks anyone?

4. What your ideal IDE for Sclada or Erlang? Anyone using the more recent Java 8?

5. Anyone tying together any of these tech languages component together? Are you using a message queueing library like ZeroMQ? Or do you embed certain engines into something like C++?

Let me know and thanks

Join my FREE newsletter to learn more about this dialogue

 

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!

TOP 10 articles for questions and answers for quant research, high frequency aka HFT, and hedge fund uses #hedgefund #hft #quant #research

TOP 10 articles for questions and answers for quant research, high frequency aka HFT, and hedge fund uses

Java based interview questions from Amazon, Bloomberg, Infosys, Goldman Sachs, Citigroup
How to get a lucrative high paying quant job?
v2.0 of Private Equity Secrets Revealed is now out!
Quant Opinion: Algo-Trading for Retail in India??
What are the major disadvantages of algo trading?
Learning calculus from Youtube’s Khan Academy channel to learn quant
Just like billionaire Jim Chanos, Harry Dent says get out of China now as seen on Bloomberg. BIG stock market crash could come in 2012
Algo-Trading for Retail in India??
How is your experience with ‘renting’ trading strategies on sites like Collective2?
 
Quant development: Java vs. C++ for low-latency
Introducing our new Yahoo Finance Database Builder for MySQL, Microsoft SQL Server, and SQLite
Quant development: C++ BOOST ASIO library for low latency communication..
Would most Quants agree that C++ is the best programming language to use to; price and structure financial derivatives?
Free C++ programming practice online test!!
Quantitative finance Quantlib author has set of excellent tutorial available for using Quantlib
 
Great tips for those taking Bloomberg Brainbench Previsor c++ online test
 
How to be a good quant C++ Algorithmic Trading Developer?
More Bloomberg C++ interview questions coming including this
Free C++ programming practice online test: http://www.cprogramming.com/cgi-bin/quiz.cgi
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!

My question and answers on strategies for those without servers at the exchanges

My question and answers on strategies for those without servers at the exchanges

Here is a Youtube email message from someone:

Hi,

Like your channel, looks like you have put a lot of thought into it. 2 questions:
1. I was thinking about joining but is your site focused on people who are trying to get jobs at HFT firms or for retail traders trying to develop their own algos within the limitations of not having servers co-located at the exchanges?
–> I would say the membership focuses on the second. I have many institutional traders who are looking for alternative ways to develop models and strategies.
2. What do you think are the best quantitative strategies for individual investors who do not have servers at the exchanges?
–> You can still do mid or low frequency with the same strategies. Having servers on the market will be regulated at some point. The SEC already noted they are investigating this.
As a retail trader without access to a server on the exchange, the best I can do is to put a server in a New Jersey data center. But even here there’s a 2+ ms delay when routing orders straight to the broker. If a server on the exchange is at <65 microseconds latency, the HFT guys can get 30+ Immediate or Cancel orders off in the time it takes for a retail guy to do one. It seems that this time disadvantage would eliminate many of the most profitable, sure-fire HFT strategies. So what strategies are left?

–> It is a distinct disadvantage and noted by the SEC. I am sure something will be addressed on this in the future. ALso, stay away platforms as they are limited to one data connection and brokers. Your broker could be corrupt if dealing with forex.

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!

Question and answers on programming to make your millions in the world of quant development or HFT

Question and answers on programming to make your millions in the world of quant development or HFT
I’m not sure how to go about phrasing this, So I will just put it out there. I have never coded before, but I’m quite sure I have the time and intelligence to become very good at it. My question to you is, can I learn to code and then design a trading bot or algo that actually works, before the entire world falls apart? Assuming the debt games can only continue for another 3-5 years maximum.

è It would take years to get to a level of mastery in coding especially in tricky languages like R, Java, or C++
What advice can you give to me? What jobs would be useful in this collapse world? How can I create great sums of wealth when the only options left seem to be in coding and trading? Surely you must have some ideas?
à I do but I feel you need to work it instead of just potentially following green arrows. You want that? Use Vector Vest or go to Vegas. Search throughout my site or Google for your answers. There is definitely no Easy answer on this
& please don’t worry about your response, the first is often the best. & I am a good judge of options.

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!

Questions and answers about Matlab and C++ execution using Interactive Brokers out of London U

Questions and answers about Matlab and C++ execution using Interactive Brokers out of London UK

> Hi Bryan,

> Resposnes below

> I saw your video some time ago and thought I have to contact this

> guy. My background is maths and I strucutre products at an investment

> bank, but don’t really get involved with algo trading though I find it

> so interesting and exciting. I want to start with Paper Trader in IB,

> so that I only simulate my strategies untill I’m really comfortable

> with it and not risking any money. Not sure if there are any other

> brokers here in London that can offer me such service.

 

–> Not sure but you could try LMAX as well. They seem pretty decent so maybe reach out to them. I would also look into maybe another data source like IQFeeds as well. As for news, you could always troll PRWire or  Twitter for news driven.

Let me know if

> you do. I prefer to code in Matlab rather than C++. The only worry I

> have is that I wont get my market data fast enough for my algo to

> compute in Matlab.

 

–? This is very true. I find Matlab to be very heavy which can slow down. YOu could always use the Coder Toolbox to convert your strategies into C++ and drop into a C++ based trading platform. I am looking at trading shim which is Linux.

My strategies are based on crude oil news feeds and

> as far as I’m aware IB will display news feeds only ever minute. Is

> this correct? I’m quite new to this so sorry about all the questions.

> Finnally how do I get my Matlab to plug into IB?

>

–> No worries on that

 

> Will be great to keep in touch.

>

 

 

> From London best wishes to you in Canada

> D

> PS: Aparently IB do have offfices here in London, so I should’t have

> too much issued with speed

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!

Typical Bloomberg phone interview questions with answers

Typical Bloomberg phone interview questions with answers

Typical Bloomberg phone interview questions:
I got phone interviewed with Bloomberg.
1)diff bet class and structure
2)syntax of copy constructor
3)why we need copy constructor?
4)why we need overloaded = operator?
5)signature of overloaded = operator for a class?
e.g. Myclass & operator =(const Myclass &)
6)why & used in return type of = operator ?
7)suppose :

class Myclass{
public:
Myclass(int a){m=a;};

private :
int m;
};

a)how will u create an array of objects of Myclass on stack?
b)how will u crete an array of objects on heap?

8)what precautions should be taken to write a class’s destructure?
9)what will u do to prevent others from creating more than one instances of ur class?
10)how will u make singleton thread safe?
10.1) what problem may occure with singleton at run time?
11)what is diff between “operator new” and “new” ?
12)what happens if new fails to allocate memory?

1. By default class has private access specifier and structure has public in C++.
2. MyClass(const MyClass &)
{
}
3. To create a copy of existing object.
4. By default = does a shallow copy so if your class has pointers to some other data type except inbuilt one then a shallow copy would be done and it may result in dangling pointers.
5. const MyClass& operator = (const MyClass &)
{
}
6. So that chaining can be possible like below
x = y = z = 10;
8. The class destructor should never throw an exception. A destructor can be called in 2 ways.One when an object goes out of scope and 2nd when stack unwinding happens.So if a destructor is called due to stack unwinding and it throws an exception then C++ unexpected is called which calles terminate which terminates the whole application.Nothing is destroyed not even local objects.
9. Make class Singleton.
10. Use Mutex to warp the code where instantiation happens.
11. Operator new allocates raw memory only.It is similar to malloc() in C.
new first allocates raw memory using operator new and then calls constructor for the class.
12. bad_alloc exception is thrown.

Reply to Comment
john on May 16, 2009 |Edit | Edit

7a: Myclass myclass[10];

7b:
Myclass *myclass = new MyClass[10];
int i;
for (i = 0; i < 10; i++) myclass[i] = new MyClass(); Cookie on May 17, 2009 |Edit | Edit @John Myclass myclass[10]; will not work.This statement would give a compile time error as the class lacks a default constructor. To construct the array on stack it would be done like below int i[] = {1,2,3,4,5,6,7,8,9,10}; MyClass myClass[10] = {1,2,3,4,5,6,7,8,9,10}; Correct:) Hi John, Your 7a is already corrected by Cookie Your '7b' is also incorrect. ---> ” Myclass *myclass = new MyClass[10]; ” here new will allocate memory and creates object as well, by calling its default constructor. During compilation, You will encounter ‘No appropriate default constructor available’ error.
Rest of the code is also error.

The correct answer to 7b is:

MyClass* mc[10];
for (int i=0; i < 10; i++) mc[i] = new MyClass(i); <--- it will call user-defined constructor here. Jey on June 10, 2009 |Edit | Edit Is it can be some thing like this for stack? MyClass objMyClass[] = {MyClass(1), MyClass(2)}; bbs59 on June 12, 2009 |Edit | Edit Jey is right, the way like MyClass myClass[10] = {1,2,3,4,5,6,7,8,9,10} is not correct. you must do it like MyClass myClass[10] = {MyClass(1),MyClass(2),...,MyClass(10)} leakymemory on September 27, 2009 |Edit | Edit That is correct of myClass[10] = {1,2,3,4,5,6,7,8,9,10} I tested in vc++ and it totally worked! creation on December 09, 2009 |Edit | Edit That is correct of myClass[10] = {1,2,3,4,5,6,7,8,9,10} I tested in vc++ and it totally worked! The constructor is not defined as explicit, it should be OK above just remember aggregation initialization: Type MyArray[size] = {Elem1, Elem2,...}; e.x, int m[] = {1,3,5,7}; So, On Stack: MyClass myArray[] = {MyClass(1), MyClass(2),...,MyClass(10)}; On Heap: MyClass* p[] = {new MyClass(1), new MyClass(2),..., new MyClass(10)}; Tim on December 12, 2009 |Edit | Edit Not really a general solution. What if it's 1000000 instead of 10? How about this? 7a. MyClass* mc = (MyClass*)(new char[10*sizeof(MyClass)]); 7b. char stackMem[10*sizeof(MyClass)]; MyClass* mc = (MyClass*)stackMem; Jey: The correct answer for allocating the objects on heap would be using placement new operator i guess. create a chunk of memory (char*) with normal new[] offset it to point to account object using placement new note placement new wont allocate any memory but calls ctor in this way u dont need a array of pointers deletion could be little tricky first explicitly call the dtor for each object and delete the chuck as a whole To point#8, it is necessary declare it as "virtual" also if the destructor is called by a base pointer: class A {...}; class B: public A {...}; ... A* pA = new B(); ... delete pA; If A destructor is not virtual only A destructor is called. 10) simplest answer is use RAII and lock the object creation, something like, MyInstance* MyInstance::Instance() { Lock lock(m_dataMutex); if(!pInstance) { pInstance = new MyInstance; } return pInstance; } but this is not multi-thread safe and also is less optimized. Read about double-check locking pattern to know more. 7a. The following code is working fine: #include
using namespace std;

class Any
{
public:
int var;

//Any() { }

Any(int v)
{
var = v;
}

Any(Any &q)
{
var = q.var;
}

void prnt()
{
std::cout << "\n Var: " << var << "\n"; } }; void main() { Any m[10] = {1,2,3,4,5,6,7,8,9,10}; for(int x=0; x<10; x++) m[x].prnt(); }

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!