Bàn về robot chứng khoán phái sinh

Chủ đề trong 'Thị trường chứng khoán' bởi peaxi, 11/09/2018.

5126 người đang online, trong đó có 556 thành viên. 22:50 (UTC+07:00) Bangkok, Hanoi, Jakarta
  1. 1 người đang xem box này (Thành viên: 0, Khách: 1)
Chủ đề này đã có 298539 lượt đọc và 2249 bài trả lời
  1. stock_pro7x

    stock_pro7x Thành viên gắn bó với f319.com Not Official

    Tham gia ngày:
    23/02/2010
    Đã được thích:
    971
    Phiên sáng short 899 đóng 894 , DVC nói lời 5 giá Tự đóng
    Phiên chiều room Khuyến nghị ai có Long đóng vị thế 905.5 vì nhóm DVC short từ 905 -909 ôm qua đêm
    Bạn tôi nói họ short cỡ 5000 hđ. Thắng thua thế nào thứ hai mới biết
    Last edited: 03/11/2018
  2. peaxi

    peaxi Thành viên gắn bó với f319.com

    Tham gia ngày:
    31/03/2014
    Đã được thích:
    1.437
    Đánh cỡ đó có ngày bị mần thịt như chơi. Ps không tham được, đánh nhỏ có ăn chứ đánh lệnh to nó nuôi cho béo rồi thịt một lần chết tươi ngay.
    Windwin82luonguct thích bài này.
  3. stock_pro7x

    stock_pro7x Thành viên gắn bó với f319.com Not Official

    Tham gia ngày:
    23/02/2010
    Đã được thích:
    971
    Đầu tuần mới rõ ai ăn ai. Giờ chưa nói được gì bác ơi.
  4. peaxi

    peaxi Thành viên gắn bó với f319.com

    Tham gia ngày:
    31/03/2014
    Đã được thích:
    1.437
    Cuối tuần gửi các bác 1 bài đọc chơi, để hiểu thêm về algo trading (không đơn giản chỉ là kết hợp các chỉ báo kỹ thuật rồi ra trading system đâu nhé các bác).

    How do trading algorithms work?

    [​IMG]
    Jae Yang

    Updated Oct 11, 2014


    Ok, as a person designing my own automated trading system, I'll take a crack at it. When someone says algorithmic trading, it covers a VAST subject. This is an incomplete but a long answer. So, grab a soda or cup of coffee, sit down, get comfortable, and read on.

    There are four major types of trading algorithms. There are:
    • Execution algorithms
    • Behavior exploitative algorithms
    • Scalping algorithms
    • Predictive algorithms
    Let me try to describe these four.

    1. Trade execution algorithms

    Many larger funds need to re-allocate their money from one asset to another. Prime brokers like Goldman Sachs market execution level trading algos to their customers promising best cost basis (or at least consistent cost basis) for establishing their positions. Simplest of these are TWAP (time weighted average pricing) and VWAP (volume weighted average pricing). There are many others that serve this function, with Goldman Sachs' Port-X being one example. Go here for their full offering example (I don't work for GS because I am not 1337 enough): Goldman Sachs Electronic Trading.

    These algorithms generally work by figuring out the capacity of asset market a given time and intelligently spacing out the order executions. You need to figure out whether you can buy multiple smaller blocks of what you want in total without having a price impact or suffering too much from price drift over time. If you have to fill an order for $100 mil worth of a asset A where average daily volume is $1 mil, you will have a huge price impact if you don't space your orders out intelligently over a long period of time. In other words, if you have a swimming pool of water that you need to pour into a series of wash buckets (representing a market capacity at a given time), you can't do it without water overflowing out of one bucket.


    At the other extreme, in the realm of HFT, you have the algorithms that generally fall into two categories (categories I use are not standard terms, just ones that help me clarify the subject):

    2. Behavior exploitative algorithms

    These try to analyze the major opponents in the same securities space. In a smaller liquidity stocks, you often have one large player and everyone else. In those spaces, intelligently figuring out the opponent's behavior becomes a bit easier than if you had 10000 other traders in the same symbol. Figuring out how the opponent trades, their rules, and edge cases that break it, allows these types of algorithms to exploit the opponent's system and profit from it.

    3. Scalping algorithms

    HFT firms compete by having the "Fastest Guns in the West." At market micro-structure level, you have essentially the opportunity of price arbitrage. If orderbook at a given instance has someone bidding at $10 and someone asking at $10.1, you have no profit there. Spread is $0.1 and this happens all the time in macro scale. But in order for a transaction to be initiated and settled, you have to have someone either bidding equal or higher amount than what someone is asking. Every so often (and I suspect a lot more often as you compress the time scale) you have situation where someone is bidding $10.0001 and some is asking $10. That's where having the fastest connections, fastest computers can net you $0.0001 minus the transaction cost basis. You buy from someone selling at $10 and sell it to another person buying at $10.0001. Scalping algos are really small, and needs to be really fast and efficient. More often than not, these algos are prototyped, tested, and then deployed on ASICs or FPGAs.

    However, because everyone else is looking for the same type of opportunity, it's a really crowded space. So you need to design a graceful failover where liquidation leg of the trade needs to incur the least loss possible.

    HFT firms, in general, create lower spread and higher liquidity for the market they operate in, great for retail traders like myself.


    Most of the time when someone talks about trading algorithm, they are talking about predictive algorithms.

    4. Predictive algorithms

    There is a whole class of algorithms that try to predict the future behavior or stocks based on combination of past information, new information, and other second order information. These are called predictive algorithms, and one where most of the lay people are looking into.

    Predictive algorithms fall into couple subcategories:
    • Mean reversion
    • Trend following
    • Chart pattern recognition
    • Fundamental analysis
    • Portfolio re-balancing algorithms

    I'll go into each of these.
    4.1 Mean reversion is based on the idea that a stock will revert to its mean trading price. Mean reversion algorithms try to establish normalized price patterns compared to either its peer, benchmark, or its own past history. Pairs trading is a very simple example where correlation and cointegration values are calculated for two stocks to figure out whether one can buy one, short other to establish a position and then close the positions when the stocks again trade in tandem. Some chart pattern recognition algorithms are supposed to take advantage of mean reversion behavior.

    4.2 Trend following algorithms try to figure out whether there is a long term trend being developed in a particular asset class. Success of such algorithms rely on figuring out who is establishing the positions. Stock market is a extremely large multi-player game and makes it difficult to perform credit assignment for a price behavior, but others have contended that second order information of net money flow from one asset to another asset by closely watching ALL asset space can yield better results in figuring out trend establishments. To put it simply, at least in short term, where accounting information hasn't changed, the asset prices are established purely based on supply-demand equilibria.

    4.3 Chart pattern recognition algorithms try to follow the old maxim (possibly false maxim) of "picture never lies." This is also called technical analysis. Technical analysis relies on seeing some aggregate chart patterns, like double top, head and shoulders, and so on. Some recent papers do talk about how chart pattern recognition can tell something about the underlying asset pricing behavior and possibly profiting from them ( http://www.cis.upenn.edu/~mkearn... )

    4.4 Fundamental analysis algorithms try to parse accounting data (essentially) to figure out whether a stock is under/overpriced compared to its peers. Larger firms with more research analysts can do this much better than retail investors like myself, since I don't have time to figure out exactly how many jeans Gap sold, for an example. Also, macroeconomic data are fed into the system to establish a sort of business cycle based models in some algorithms.

    4.5 Portfolio rebalancing algorithms try to take advantage of couple different idea about the asset market pricing behaviors. There are Smart Beta type of portfolio rebalancing algorithms, which try to take advantage of "free lunch" that one see in portfolio constructed only of low volatility assets, and On-line portfolio rebalancing type of algorithms where one tries to take advantage of hypothesis on money-flow and/or mean-reverting behaviors in a universe of assets.




    I'm sorry this answer is rather incomplete. I didn't even go into market microstructures. There are another whole class of sentiment analysisalgorithms that I am just not educated enough about to make a guess. I also didn't cover news based algorithms because I think they are largely voodoo science (feel free to disagree and let me know if I am wrong). I also didn't include trading algorithms based on completely unsupervised learning algorithmsbecause I think frequent regime changes ensure that they don't work properly over a longer period of time. I hope my incomplete answer helped you on the right path to understand trading algorithms.

    Thanks for reading.
    bachnv, bdragonActxstock thích bài này.
  5. stock_pro7x

    stock_pro7x Thành viên gắn bó với f319.com Not Official

    Tham gia ngày:
    23/02/2010
    Đã được thích:
    971
    Nhóm DVC short 5000hđ giá 905-909 mở bát đầu phiên thứ hai lồi mồm còn mịa nó rồi
  6. luonguct

    luonguct Thành viên này đang bị tạm khóa Đang bị khóa Not Official

    Tham gia ngày:
    07/03/2016
    Đã được thích:
    13.685
    Lên thớt 3 ngày liên tiếp rồi mà vẫn còn PR dữ. Sao lại báo MOD xóa topic kia đi vậy? Nhìn OI vậy mà nói nhóm DVC hold 5K mà bác cũng tin sao? Bị hack não quá nghiêm trọng rồi? Nên mở topic riêng để chém nâng bi DVC đi, lở không may có sai thì báo MOD xóa cho tiện. :))
    xstock thích bài này.
  7. SuperChick

    SuperChick Thành viên gắn bó với f319.com

    Tham gia ngày:
    06/01/2017
    Đã được thích:
    1.206
    Chơi PS còn bị rủi ro hệ thống nữa các cụ đã từng bị chưa? Tôi L 89x mà hệ thống Vpbs bị lỗi ngày thứ 6 ko chốt dc, tôi chưa từng hold qua đêm! Hôm nay trở lại nơi bắt đầu luôn, đấy là chưa kể tôi bị mất 1 vòng S 910 về :(
    luonguctxstock thích bài này.
  8. luonguct

    luonguct Thành viên này đang bị tạm khóa Đang bị khóa Not Official

    Tham gia ngày:
    07/03/2016
    Đã được thích:
    13.685
    CKPS mà hold lệnh qua đêm thật là rủi ro. Các CTCK điều có bộ phận tự doanh nên họ cân được lệnh đó là lý do vì sao ATO và sau giờ nghỉ trưa hay có GAP. :((
  9. backydautroc2

    backydautroc2 Thành viên gắn bó với f319.com

    Tham gia ngày:
    27/11/2014
    Đã được thích:
    1.060
    Bữa thứ sáu em cũng bị vạ ở VPBS ạ. Em long 897, treo cover 899.9 rồi sau đó hủy lệnh, rồi treo lệnh cover khác ở 899.6. Xong cắm mũi cày
    Đến 1h nó kéo 905 trong vòng 3 nốt nhạc, hí hửng tưởng lời mò vào TK xem, thấy báo lỗ lệnh short, choáng váng ngã đập đầu vào bàn phím, hóa ra lệnh hủy của em nó ko tính :((:((:((:((
    PS kéo lên đến tận 910 huhuhu tính ra lỗ 1 triệu 1 HĐ, em bèn short thêm 910 kéo trung bình giá của em xuống 903, cuối phiên vẫn lỗ :((:((:((:((
    Em nuôi đến sáng nay cover lại 897, cuối cùng lại thành lời >:)>:)>:)>:)
    Bởi vậy mưu sự tại nhân mà thành sự do hệ thống của CTCK thôi hà
    SuperChickluonguct thích bài này.
  10. luonguct

    luonguct Thành viên này đang bị tạm khóa Đang bị khóa Not Official

    Tham gia ngày:
    07/03/2016
    Đã được thích:
    13.685
    ATO tạo GAP nên khó trade thật. Hệ thống cho tín hiệu Intraday giảm nhưng GAP lớn cộng thêm basis -4 điểm nên không dám Short. Long lại càng không nên chỉ đứng nhìn mà vẫn bị thua. Đó là mất thời gian! :))
    matcuadatxstock thích bài này.

Chia sẻ trang này