วันอาทิตย์ที่ 4 กุมภาพันธ์ พ.ศ. 2561

AI in Finance

AI หมายถึง ความฉลาดที่มีอยู่ในสิ่งไม่มีชีวิตเช่นฮาร์ดแวร์หรือซอฟแวร์
ความฉลาดหมายถึงความสามารถในการคิดได้คล้ายสิ่งมีชีวิตและแสดงออกทางภาษาหรือการกระทำ

หลักการทำงาน:
• Vision : image recognition
• NLP : speech to text, text to speech, translation, info extraction e.g. text mining
• Reasoning : machine learning, deep learning, expert system, recommendation systems
(machine learning :  unsupervised Learning  เช่น clustering,  reinforcement Learning เช่น หมากรุก  ที่ไม่สามารถบอกการเดินแต่ละตาได้ว่าแบบไหนถูกหรือผิดด้วยวิธี supervised Learning แต่ต้องบอกด้วยrewardคือการแพ้หรือชนะเมื่อเกมสิ้นสุดลงแทน อีกตัวอย่างคือ ปิงปองโดยมีrewardเป็นคะแนน  การคลานถ้าคลานไปด้านหน้าจะได้ reward)

พัฒนาการปัจจุบัน
AlphaGo ชนะนักเล่นหมากล้อมมือหนึ่งของโลกชาวเกาหลีได้โดยใช้ machine learning เพื่อพยากรณ์ next move ของฝ่ายตรงข้ามจากนั้นสร้าง Monte carlo search tree ขึ้นมาหา path และโอกาสชนะ ถ้าต่ำกว่า 20% จะขอผ่านไม่เดินหมาก
Tensorflow เป็น framework ทำ machine learning
ฝั่ง finance:
By using machine learning Wall Street can number crunch millions of data points in real time and capture some of the correlations that traditional statistics models could not capture, and that is actually the dollar track to go after today.
AI helps people to manage lots of data sources and come up with new patterns to help estimate trading, ideas, and make better investing decisions.
Now all the traders have so many real-time streaming news, and to mine information from these unstructured data sets (e.g, images, videos) becomes very important, so we need new technology to handle this, which is new even to Wall Street, but with ML and deep learning we can now look at all these unstructured data sets and mine lots of trading insights which we could not do before.
We can do all this today in natural language processing, which means we can have a computer understand the semantics and meaning of how people say something…and in news, this could be something positive or negative about certain companies, and that’s something we call sentiment analysis. We are building something called a sentiment score, which means we are leveraging all the sentiment we collect from traders, news, blogs, and we’re collecting some of the data from transactions. For example, we collect all the insider data trading sets, so we know for which company, which CEO or CXO is buying or selling stocks; try integrating this transaction data with the trader’s sentiments, and we can come up with a better score to know how people think about a set of stocks.
AI can actually scan (e.g. detect candles) every single stock and find all the tradable classical chart patterns, and you don’t have to do it by using human eyes.
There’s a need for robo-advisors that will better take into account and integrate individuals’ behavior patterns alongside their stated financial objectives, resulting in more adaptive and targeted investments.
I think we’ll see not only Financial advisors but also a lot of brokers losing their jobs, a lot of financial advisors, bankers are going to get hit. It’s going to be the banks that will fire the most people. They’re going to have fewer people at the window, fewer people in the back office.
Many quant trading firms (include Two Sigma Investments, D. E. Shaw (company), Renaissance Technologies (hedge fund), and Hudson River Trading) use machine learning techniques on data feeds for automated trades. These trading firms usually trade on very weak correlations that are uncovered in research from quantitative analysts. Firms heavily optimize their strategies for speed. With the low latency, they can beat anyone else to the right trade, since only the fastest players will get the profit.

Back test ไม่ได้ผลใน out-of-sampling test
สาเหตุที่เป็นไปได้คือ
• Local minimum (error) vs. global minimum : ที่ไม่พบ global เพราะ inputs หรือ initial weights เลือกมาไม่ดี
• จำนวนปัจจัยนำเข้าเปลี่ยนแปลงตลอดเวลา เช่น มีมหาเศรษฐีคนใหม่แต่ชี้นำตลาดได้ การตัดสินใจของเขาต้องถูกนำมาใช้ใน AI ด้วย
• ความไร้ pattern ของตลาดทำให้ต้องใช้ nondeterministic machine ที่เมื่อได้รับตัวเลือกจะเลือกถูกเสมอ มาช่วยซึ่งยังไม่อุบัติขึ้นในโลก

แนวโน้มในอนาคต :
• ถ้ามี AI มา trade กันมากๆ การเล่นหุ้นปกติต้องมีฝ่ายได้และฝ่ายเสีย แต่ถ้าเก่งกันหมดก็ไม่มีใครทำกำไรได้ อย่างไรก็ตามในทางปฏิบัติ ไม่ใช่ทุกคนจะมีหรือจะใช้เครื่องมือ AI แต่ละคนมีพฤติกรรมในการลงทุนต่างกัน เล่นสั้น เล่นกลาง เล่นยาว และสามารถกำหนดนโยบายการวางกลยุทธให้กับเครื่องมือ AI ต่างกัน ในภาพรวมแล้วจึงไม่น่าเป็นไปได้ที่จะไม่สามารถทำกำไรได้
• ปัจจุบันอาจเรียกได้ว่าเป็นยุคบุกเบิกของ AI trading คือแค่นำ AI มาจับ pattern ในตลาดเพื่อหาโอกาสทำกำไร มนุษย์ย่อมทำกำไรยากขึ้นอุปมาเหมือนสู้กับAlphaGoก็ต้องปรับตัวด้วยการหันมาศึกษาเครื่องมือ AI จนกลายมาเป็น common knowledge ดังนั้นยุคถัดไป AI จะเป็นเครื่องมือพื้นฐานสำหรับผู้เล่นทุกคนก็จะเป็นยุคการใช้ตัวแทนคือ agent หรือถ้าผนวกพฤติกรรมมนุษย์ลงไปด้วยก็กลายเป็น digital twin มา trade กันในตลาด agent แต่ละตัวจะมีพฤติกรรมไม่เหมือนกันตามเป้าหมายของเจ้าของที่ต่างกัน ก็ยังน่าจะสามารถทำกำไรกันได้อยู่ แต่ agent ก็จะวิวัฒนาการไปเรื่อยๆ เช่น เรื่องความเร็วในการเคาะซื้อขายใครประมวลผลเร็วกว่าได้เปรียบคล้ายๆการขุดบิตคอยน์การ์ดจอใครแรงกว่าก็ขุดได้เยอะกว่า แต่สำหรับนักลงทุนรายบุคคลอาจไม่มีการได้เปรียบเสียเปรียบมากเพราะใช้ในรูปแบบบริการคลาวด์ได้ ส่วนนักลงทุนระดับสถาบันอาจมีการลงทุนโครงสร้างพื้นฐานเหล่านี้เองและพัฒนาขั้นตอนวิธีเองเพื่อจับสัญญาณบวกได้เร็วที่สุดเพื่อทำกำไร และ agent อาจไปถึงจุดที่ใช้ tactics ต่างๆ เข้ามาเช่นการการพราง pattern คล้ายๆ polymorphic virus เช่น agent ของนักลงทุนรายใหญ่ทำการเข้ารหัสลับข้อมูลที่ตนเผยแพร่ออกมาเพื่อไม่ให้ถูก mining ได้ อีกหน่อย digital inventor อาจจะหาเลี้ยงเราที่เป็น physical investor
• Quantum computer ช่วยให้ AI พัฒนาได้เร็วขึ้น AI will become common knowledge among financial institutions just like mobile apps & social media

AI ต่างจากคนตรงที่ ขาดความคิดสร้างสรรค์ การสร้าง story ของสินค้า handmade ไม่มี สร้างโจทย์เองไม่ได้ต้องให้คนหาโจทย์และเลือกหยิบaiที่เหมาะสมมาตอบโจทย์ ดังนั้นรู้จัก ใช้เป็น ไม่ตกงาน