Spaces:
Running
Running
Add debug logs to investigate EOD date issue
Browse files- src/views/LiveView.vue +16 -9
src/views/LiveView.vue
CHANGED
|
@@ -195,6 +195,7 @@ const asset = ref('BTC')
|
|
| 195 |
const rowsRef = ref([])
|
| 196 |
let allDecisions = []
|
| 197 |
const cards = shallowRef([])
|
|
|
|
| 198 |
|
| 199 |
let unsubscribe = null
|
| 200 |
|
|
@@ -271,14 +272,17 @@ const winners = computed(() => {
|
|
| 271 |
|
| 272 |
/* chart selections */
|
| 273 |
const winnersForChart = computed(() =>
|
| 274 |
-
winners.value.map(w =>
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
| 282 |
)
|
| 283 |
|
| 284 |
/* stable key to avoid identity churn */
|
|
@@ -345,8 +349,11 @@ async function computeEquities(sel) {
|
|
| 345 |
days = Math.max(1, Math.round((end - start) / 86400000) + 1)
|
| 346 |
} catch {}
|
| 347 |
|
|
|
|
|
|
|
|
|
|
| 348 |
return {
|
| 349 |
-
date:
|
| 350 |
stratLast: stratY[lastIdx],
|
| 351 |
bhLast: bhY[lastIdx],
|
| 352 |
sharpe,
|
|
|
|
| 195 |
const rowsRef = ref([])
|
| 196 |
let allDecisions = []
|
| 197 |
const cards = shallowRef([])
|
| 198 |
+
const refreshing = ref(false)
|
| 199 |
|
| 200 |
let unsubscribe = null
|
| 201 |
|
|
|
|
| 272 |
|
| 273 |
/* chart selections */
|
| 274 |
const winnersForChart = computed(() =>
|
| 275 |
+
winners.value.map(w => {
|
| 276 |
+
console.log('[LiveView] Winner end_date:', w.agent_name, w.end_date) // Debug
|
| 277 |
+
return {
|
| 278 |
+
agent_name: w.agent_name,
|
| 279 |
+
asset: w.asset,
|
| 280 |
+
model: w.model,
|
| 281 |
+
strategy: w.strategy,
|
| 282 |
+
decision_ids: Array.isArray(w.decision_ids) ? w.decision_ids : undefined,
|
| 283 |
+
end_date: w.end_date // use leaderboard's end_date
|
| 284 |
+
}
|
| 285 |
+
})
|
| 286 |
)
|
| 287 |
|
| 288 |
/* stable key to avoid identity churn */
|
|
|
|
| 349 |
days = Math.max(1, Math.round((end - start) / 86400000) + 1)
|
| 350 |
} catch {}
|
| 351 |
|
| 352 |
+
const finalDate = sel.end_date || seq[lastIdx].date
|
| 353 |
+
console.log('[LiveView] computeEquities date:', sel.agent_name, 'end_date:', sel.end_date, 'seq last:', seq[lastIdx].date, 'final:', finalDate) // Debug
|
| 354 |
+
|
| 355 |
return {
|
| 356 |
+
date: finalDate, // prefer leaderboard's end_date
|
| 357 |
stratLast: stratY[lastIdx],
|
| 358 |
bhLast: bhY[lastIdx],
|
| 359 |
sharpe,
|