리포팅 테스트

This commit is contained in:
2026-04-16 15:48:23 +09:00
parent 68a7a05961
commit ed12d07bc2
9 changed files with 890 additions and 162 deletions
+1 -81
View File
@@ -41,6 +41,7 @@ import kotlinx.serialization.json.putJsonObject
import model.ConfigIndex
import model.KisSession
import model.RankingStock
import model.TradingDecision
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
@@ -676,84 +677,3 @@ object RagService {
}
@Serializable
class TradingDecision {
var corpName : String = ""
var stockName : String = ""
var ultraShortScore: Double = 0.0 // 초단기 (분봉/에너지)
var shortTermScore: Double = 0.0 // 단기 (일봉/뉴스)
var midTermScore: Double = 0.0 // 중기 (주봉/재무)
var longTermScore: Double = 0.0
// [추가] 화면 전환용 종목명
var currentPrice: Double = 0.0
var stockCode: String = ""
var decision: String? = null
var reason: String? = null
var confidence: Double = 0.0
var newsScore : Double = 0.0
var systemScore : Double = 0.0
var financialScore : Double = 0.0
var technicalScore : Double = 0.0
var investmentGrade : InvestmentGrade? = null
var techSummary : String? = null
var newsContext : String? = null
var financialData : String? = null
var analyzer : TechnicalAnalyzer? = null
var signalModel : ScalpingSignalModel? = null
fun shortPossible() =
listOf<Double>(ultraShortScore,
shortTermScore).average()
fun profitPossible() =
listOf<Double>(ultraShortScore,
shortTermScore,
midTermScore,
longTermScore).average()
fun safePossible() =
listOf<Double>(
midTermScore,
longTermScore).average()
fun summary() : String{
return """
$corpName[$stockName]
수익실현 가능성 : ${profitPossible()}
investmentGrade:${investmentGrade!!.name}
ultraShortScore :$ultraShortScore
shortTermScore :$shortTermScore
midTermScore :$midTermScore
longTermScore :$longTermScore
systemScore :$systemScore
technicalScore: $technicalScore
financialScore: $financialScore
newsScore: $newsScore
decision: $decision
reason: $reason
""".trimIndent()
}
override fun toString(): String {
return """
$corpName($stockName)
수익실현 가능성 : ${profitPossible()}
ultraShortScore :$ultraShortScore
shortTermScore :$shortTermScore
midTermScore :$midTermScore
longTermScore :$longTermScore
decision: $decision
investmentGrade:${investmentGrade!!.name}
reason: $reason
confidence: $confidence
기술 분석: $techSummary
뉴스 점수: $newsScore
""".trimIndent()
}
}
//재무재표: $financialData
//뉴스: $newsContext