← Field Notes
5 December 20265 ธันวาคม 25694 min readอ่าน 4 นาทีNinetifac AI dev log

Ninetifac AI dev log #2: alpha testing, plus two separate research projectsบันทึกการพัฒนา Ninetifac AI #2: เปิดทดสอบอัลฟา และงานวิจัยแยกอีกสองเรื่อง

The Ninetifac AI alpha is running and AI analysis is planned for mid-December. Separately from Ninetifac, I am researching track edges from aerial images and an S&P 500 risk and trading model, both still in progress.อัลฟาของ Ninetifac AI กำลังทดสอบอยู่ และมีแผนเพิ่ม AI วิเคราะห์ภายในกลางเดือนธันวาคม ส่วนที่แยกจาก Ninetifac ผมกำลังวิจัยการหาขอบสนามจากภาพถ่ายทางอากาศ และโมเดลความเสี่ยงกับการเทรด S&P 500 ซึ่งทั้งสองเรื่องยังทำอยู่

Ninetifac AI desktop app showing the Chang International Circuit track page

Three things moved since dev log #1. One is Ninetifac itself. The other two are separate research projects that are not part of Ninetifac.

The alpha test is running, AI analysis comes next

PartStatusDetail
Desktop app for WindowsAlpha testReleased 28 November. Alpha licences run to 31 December 2026.
AI analysis inside the appPlanned by mid-DecemberShown as "coming soon" today.
Mac versionLaterNot released yet.

Alpha testers can use the Bench, Corners and Training screens now. I plan to add AI analysis by the middle of December.

Research: finding the edge of the track from aerial images

A lap time model needs to know how wide the track is at every point. In a research project separate from Ninetifac, I work that out from aerial images:

  1. Line up images of the same circuit from several dates, so shadows and cloud on one can be filled from another.
  2. Straighten the track along the racing line and learn what its tarmac colour looks like.
  3. Every 5 metres, find where the colour changes on each side.
  4. Choose a smooth edge around the whole lap that follows painted lines and stays out of the pit lane. A segmentation model (SAM 2.1) gives a second opinion.

This is the result at Bira and Chang. Blue is the track edge the engine found, red is the outer edge of the kerbs and purple is the racing line. Orange dots mark places with no usable image, where it kept the previous width.

Aerial view of Bira Circuit with the detected track edges drawn in blue
Bira Circuit, whole track. Imagery: Esri, Maxar, Earthstar Geographics.
Close view of Bira corners with blue edge lines following the tarmac
Bira, close up. Imagery: Esri, Maxar, Earthstar Geographics.
Aerial view of Chang International Circuit with the detected track edges drawn in blue
Chang International Circuit, whole track. Imagery: Esri, Maxar, Earthstar Geographics.
Close view of Chang corners with blue edge lines following the tarmac
Chang, close up. Imagery: Esri, Maxar, Earthstar Geographics.

It is not a survey, and some places still need work.

Feeding the edges into lap time prediction (still in progress)

The widths from the images can now go into a minimum lap time optimiser: an open-source physics solver from the Technical University of Munich, plus a model of the car. For my Civic EG at Bira it predicts 1:13.06, with a range of 1:10.65 to 1:16.65 depending on the grip and power assumed.

Predicted fastest line around Bira coloured by speed
Predicted line and corner speeds for the Civic EG model at Bira.

I believe this figure is accurate: some pro drivers lap Bira in a Civic EG at around this time. I still need to prove it myself on the track.

Next: re-run on the new edges (this run used the earlier ones), drive and log a real lap, and compare.

On the side: from a maths model to a risk model to an S&P 500 trading model

This is a separate research project, still in progress. Everything below is from backtests. It is not investment advice.

1. Maths model. AI research agents ran 385 walk-forward tests: fit on the past, score on later data. Guessing the market's direction came out close to a coin flip (AUC 0.45 to 0.53). One signal that looked good turned out to be using data revised after the fact.

2. Risk model. How much the market will swing is far more predictable. The VIX index ranks next month's volatility well (rank correlation 0.67). My refitted version did barely better than the VIX on its own.

Forecast and actual S&P 500 volatility from 2016 to 2026
The forecast follows the level of risk, and reacts just after a sudden spike starts.

3. Trading model. It holds stocks, bonds and gold, and sizes them by risk. It borrows less as losses build up and trades only when the change is worth the cost. It does not try to predict direction.

Backtest of the model against S&P 500 buy-and-hold from 2020 to 2026
Weekly values to 20 November; the table runs to 27 November, so the end values differ. Daily figures show deeper falls.
Backtest, 2020 to 27 Nov 2026, starting with $10,000My modelS&P 500 buy-and-hold
Ending value$14,684$24,927
Return per year5.7%14.2%
Worst fall (daily)-22.4%-33.7%
Sharpe ratio0.290.62

So far it falls less and earns much less. Across 2006 to 2026, chaining three model versions that were each tested on unseen years, it ends at about $50,000 against $83,000, with a worst fall of -22.4% against -55.2%. It also fails one stress test, and there is no live track record for it.

What's next

  • AI analysis in the alpha, planned by mid-December.
  • Tuned edges into the lap time model, then a comparison with a real lap.
  • More work on the trading model before I trust it with anything.

Want to try the alpha or get a debrief at your next track day? Email me or see the status board.

ตั้งแต่ บันทึก #1 มีความคืบหน้า 3 เรื่อง เรื่องแรกคือ Ninetifac เอง อีกสองเรื่องเป็นงานวิจัยแยกต่างหาก ไม่ได้เป็นส่วนหนึ่งของ Ninetifac

อัลฟากำลังทดสอบ ต่อไปคือ AI วิเคราะห์

ส่วนสถานะรายละเอียด
แอปเดสก์ท็อปสำหรับ Windowsทดสอบอัลฟาปล่อยเมื่อ 28 พฤศจิกายน ไลเซนส์อัลฟาใช้ได้ถึง 31 ธันวาคม 2569
AI วิเคราะห์ในแอปแผนภายในกลางเดือนธันวาคมตอนนี้ยังขึ้นว่า "coming soon"
เวอร์ชัน Macภายหลังยังไม่ปล่อย

ผู้ทดสอบอัลฟาใช้หน้า Bench, Corners และ Training ได้แล้ว ผมวางแผนเพิ่ม AI วิเคราะห์ภายในกลางเดือนธันวาคม

งานวิจัย: หาขอบสนามจากภาพถ่ายทางอากาศ

โมเดลเวลาต่อรอบต้องรู้ว่าสนามกว้างเท่าไรในทุกจุด ในงานวิจัยที่แยกจาก Ninetifac ผมคำนวณจากภาพถ่ายทางอากาศ:

  1. ซ้อนภาพสนามเดียวกันจากหลายวันที่ให้ตรงกัน เพื่อใช้ภาพหนึ่งเติมเงาและเมฆของอีกภาพ
  2. ดัดสนามให้ตรงตามเรซซิ่งไลน์ แล้วเรียนรู้สีของผิวแทร็ก
  3. ทุก 5 เมตร หาจุดที่สีเปลี่ยนในแต่ละฝั่ง
  4. เลือกเส้นขอบที่ต่อเนื่องรอบสนาม ตามเส้นที่ทาสีไว้และไม่หลุดเข้าพิตเลน โดยมีโมเดลแบ่งส่วนภาพ (SAM 2.1) ช่วยตรวจอีกชั้น

นี่คือผลลัพธ์ที่สนามบีร่าและสนามช้าง เส้นสีฟ้าคือขอบแทร็กที่ระบบหาได้ สีแดงคือขอบนอกของเคิร์บ และสีม่วงคือเรซซิ่งไลน์ จุดสีส้มคือตำแหน่งที่ไม่มีภาพที่ใช้ได้ ระบบจึงใช้ความกว้างเดิมต่อ

ภาพถ่ายทางอากาศสนามบีร่าพร้อมเส้นขอบแทร็กสีฟ้า
สนามบีร่าทั้งสนาม ภาพ: Esri, Maxar, Earthstar Geographics
ภาพระยะใกล้โค้งสนามบีร่า เส้นสีฟ้าตามขอบผิวแทร็ก
บีร่า ระยะใกล้ ภาพ: Esri, Maxar, Earthstar Geographics
ภาพถ่ายทางอากาศสนามช้างพร้อมเส้นขอบแทร็กสีฟ้า
สนามช้างทั้งสนาม ภาพ: Esri, Maxar, Earthstar Geographics
ภาพระยะใกล้โค้งสนามช้าง เส้นสีฟ้าตามขอบผิวแทร็ก
ช้าง ระยะใกล้ ภาพ: Esri, Maxar, Earthstar Geographics

ผลนี้ไม่ใช่การรังวัด และบางจุดยังต้องปรับปรุง

ส่งขอบสนามเข้าโมเดลทำนายเวลาต่อรอบ (ยังทำอยู่)

ความกว้างสนามที่ได้จากภาพส่งเข้าตัวหาเวลาต่อรอบต่ำสุดได้แล้ว ซึ่งเป็นโซลเวอร์ฟิสิกส์โอเพนซอร์สจาก Technical University of Munich บวกกับโมเดลของรถ สำหรับ Civic EG ของผมที่สนามบีร่า ทำนายได้ 1:13.06 ช่วง 1:10.65 ถึง 1:16.65 ตามค่ายึดเกาะและกำลังที่สมมติ

เส้นทางเร็วที่สุดที่ทำนายได้รอบสนามบีร่า แสดงสีตามความเร็ว
เส้นและความเร็วในโค้งที่ทำนายได้ของโมเดล Civic EG ที่สนามบีร่า

ผมเชื่อว่าตัวเลขนี้แม่น เพราะมีนักขับระดับโปรบางคนทำเวลาที่สนามบีร่าด้วย Civic EG ได้ใกล้เคียงกันนี้ แต่ผมยังต้องพิสูจน์ด้วยตัวเองในสนาม

ขั้นต่อไป: รันใหม่ด้วยขอบสนามชุดใหม่ (รอบนี้ใช้ชุดก่อนหน้า) ขับและเก็บข้อมูลรอบจริง แล้วนำมาเทียบ

งานเสริม: จากโมเดลคณิตศาสตร์ สู่โมเดลความเสี่ยง สู่โมเดลเทรด S&P 500

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

1. โมเดลคณิตศาสตร์ ทีม AI ช่วยวิจัยรันการทดสอบแบบ walk-forward 385 ครั้ง คือฝึกจากอดีตแล้ววัดผลกับข้อมูลช่วงหลัง การเดาทิศทางตลาดได้ผลใกล้เคียงการโยนเหรียญ (AUC 0.45 ถึง 0.53) สัญญาณหนึ่งที่ดูดีกลับกลายเป็นว่าใช้ข้อมูลที่ถูกแก้ไขภายหลัง

2. โมเดลความเสี่ยง ความผันผวนของตลาดคาดการณ์ได้ดีกว่ามาก ดัชนี VIX จัดอันดับความผันผวนเดือนถัดไปได้ดี (rank correlation 0.67) ส่วนโมเดลที่ผมปรับค่าใหม่ดีกว่า VIX เดี่ยว ๆ เพียงเล็กน้อยมาก

ความผันผวนของ S&P 500 ที่ทำนายและที่เกิดจริง ปี 2016 ถึง 2026
การทำนายตามระดับความเสี่ยงได้ แต่ตอบสนองหลังความผันผวนพุ่งขึ้นแล้วเล็กน้อย

3. โมเดลเทรด ถือหุ้น พันธบัตร และทองคำ จัดสัดส่วนตามความเสี่ยง ลดการกู้เมื่อขาดทุนสะสม และซื้อขายเมื่อคุ้มต้นทุนเท่านั้น ไม่พยายามทำนายทิศทาง

การทดสอบย้อนหลังของโมเดลเทียบกับการถือ S&P 500 ปี 2020 ถึง 2026
ค่ารายสัปดาห์ถึง 20 พฤศจิกายน ส่วนตารางถึง 27 พฤศจิกายน ค่าสุดท้ายจึงต่างกัน ค่ารายวันลงลึกกว่า
ทดสอบย้อนหลัง 2020 ถึง 27 พ.ย. 2026 เริ่มต้น $10,000โมเดลของผมซื้อแล้วถือ S&P 500
มูลค่าสุดท้าย$14,684$24,927
ผลตอบแทนต่อปี5.7%14.2%
ลดลงมากที่สุด (รายวัน)-22.4%-33.7%
Sharpe ratio0.290.62

ถึงตอนนี้โมเดลลงน้อยกว่าแต่ได้กำไรน้อยกว่ามาก ช่วง 2006 ถึง 2026 เมื่อต่อผลของโมเดล 3 เวอร์ชันที่แต่ละเวอร์ชันทดสอบกับปีที่ไม่เคยเห็น จบที่ประมาณ $50,000 เทียบกับ $83,000 และลดลงมากที่สุด -22.4% เทียบกับ -55.2% โมเดลยังไม่ผ่าน stress test หนึ่งข้อ และยังไม่มีผลการเทรดจริงของโมเดลนี้

ต่อไป

  • AI วิเคราะห์ในอัลฟา มีแผนภายในกลางเดือนธันวาคม
  • ใส่ขอบสนามที่ปรับจูนแล้วเข้าโมเดลเวลาต่อรอบ แล้วเทียบกับรอบจริง
  • พัฒนาโมเดลเทรดต่อก่อนจะไว้ใจมัน

อยากลองอัลฟา หรืออยากได้สรุปผลในแทร็กเดย์ครั้งหน้า? อีเมลหาผม หรือดู กระดานสถานะ