Coverage for src / mysingle / protos / services / backtest / v1 / backtest_service_pb2.py: 0%

61 statements  

« prev     ^ index     » next       coverage.py v7.12.0, created at 2025-12-02 00:58 +0900

1# -*- coding: utf-8 -*- 

2# Generated by the protocol buffer compiler. DO NOT EDIT! 

3# NO CHECKED-IN PROTOBUF GENCODE 

4# source: services/backtest/v1/backtest_service.proto 

5# Protobuf Python Version: 6.33.1 

6"""Generated protocol buffer code.""" 

7 

8from google.protobuf import descriptor as _descriptor 

9from google.protobuf import descriptor_pool as _descriptor_pool 

10from google.protobuf import runtime_version as _runtime_version 

11from google.protobuf import symbol_database as _symbol_database 

12from google.protobuf.internal import builder as _builder 

13 

14_runtime_version.ValidateProtobufRuntimeVersion( 

15 _runtime_version.Domain.PUBLIC, 

16 6, 

17 33, 

18 1, 

19 "", 

20 "services/backtest/v1/backtest_service.proto", 

21) 

22# @@protoc_insertion_point(imports) 

23 

24_sym_db = _symbol_database.Default() 

25 

26 

27DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( 

28 b'\n+services/backtest/v1/backtest_service.proto\x12\x08\x62\x61\x63ktest\x1a\x1fgoogle/protobuf/timestamp.proto"\xd4\x01\n\x16\x45xecuteBacktestRequest\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\x12\x1f\n\x0bstrategy_id\x18\x02 \x01(\tR\nstrategyId\x12\x35\n\x14strategy_version_seq\x18\x03 \x01(\x05H\x00R\x12strategyVersionSeq\x88\x01\x01\x12\x30\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x18.backtest.BacktestConfigR\x06\x63onfigB\x17\n\x15_strategy_version_seq"\xcb\x05\n\x0e\x42\x61\x63ktestConfig\x12\x16\n\x06symbol\x18\x01 \x01(\tR\x06symbol\x12\x1a\n\x08interval\x18\x02 \x01(\tR\x08interval\x12\x1d\n\nstart_date\x18\x03 \x01(\tR\tstartDate\x12\x19\n\x08\x65nd_date\x18\x04 \x01(\tR\x07\x65ndDate\x12\'\n\x0finitial_capital\x18\x05 \x01(\x01R\x0einitialCapital\x12&\n\x0cslippage_bps\x18\x06 \x01(\x01H\x00R\x0bslippageBps\x88\x01\x01\x12\x35\n\x14\x63ommission_per_trade\x18\x07 \x01(\x01H\x01R\x12\x63ommissionPerTrade\x88\x01\x01\x12\'\n\rstop_loss_pct\x18\x08 \x01(\x01H\x02R\x0bstopLossPct\x88\x01\x01\x12+\n\x0ftake_profit_pct\x18\t \x01(\x01H\x03R\rtakeProfitPct\x88\x01\x01\x12/\n\x11max_position_size\x18\n \x01(\x01H\x04R\x0fmaxPositionSize\x88\x01\x01\x12<\n\x06params\x18\x0b \x03(\x0b\x32$.backtest.BacktestConfig.ParamsEntryR\x06params\x12?\n\x19snapshot_interval_seconds\x18\x0c \x01(\x05H\x05R\x17snapshotIntervalSeconds\x88\x01\x01\x1a\x39\n\x0bParamsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x0f\n\r_slippage_bpsB\x17\n\x15_commission_per_tradeB\x10\n\x0e_stop_loss_pctB\x12\n\x10_take_profit_pctB\x14\n\x12_max_position_sizeB\x1c\n\x1a_snapshot_interval_seconds"T\n\x18GetBacktestResultRequest\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId"Q\n\x15StreamProgressRequest\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId"M\n\x11GetMetricsRequest\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId"\xd4\x01\n\x14ListBacktestsRequest\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\x12$\n\x0bstrategy_id\x18\x02 \x01(\tH\x00R\nstrategyId\x88\x01\x01\x12\x1b\n\x06status\x18\x03 \x01(\tH\x01R\x06status\x88\x01\x01\x12\x19\n\x05limit\x18\x04 \x01(\x05H\x02R\x05limit\x88\x01\x01\x12\x17\n\x04skip\x18\x05 \x01(\x05H\x03R\x04skip\x88\x01\x01\x42\x0e\n\x0c_strategy_idB\t\n\x07_statusB\x08\n\x06_limitB\x07\n\x05_skip"Q\n\x15\x43\x61ncelBacktestRequest\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId"\x14\n\x12HealthCheckRequest"\xa7\x01\n\x17\x45xecuteBacktestResponse\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x16\n\x06status\x18\x02 \x01(\tR\x06status\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x39\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt"\xec\x04\n\x16\x42\x61\x63ktestResultResponse\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x1f\n\x0bstrategy_id\x18\x02 \x01(\tR\nstrategyId\x12\x35\n\x14strategy_version_seq\x18\x03 \x01(\x05H\x00R\x12strategyVersionSeq\x88\x01\x01\x12\x16\n\x06status\x18\x04 \x01(\tR\x06status\x12;\n\x07metrics\x18\x05 \x01(\x0b\x32\x1c.backtest.PerformanceMetricsH\x01R\x07metrics\x88\x01\x01\x12\'\n\x06trades\x18\x06 \x03(\x0b\x32\x0f.backtest.TradeR\x06trades\x12\x38\n\x0c\x65quity_curve\x18\x07 \x03(\x0b\x32\x15.backtest.EquityPointR\x0b\x65quityCurve\x12\x30\n\x06\x63onfig\x18\x08 \x01(\x0b\x32\x18.backtest.BacktestConfigR\x06\x63onfig\x12\x39\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x42\n\x0c\x63ompleted_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x0b\x63ompletedAt\x88\x01\x01\x12(\n\rerror_message\x18\x0b \x01(\tH\x03R\x0c\x65rrorMessage\x88\x01\x01\x42\x17\n\x15_strategy_version_seqB\n\n\x08_metricsB\x0f\n\r_completed_atB\x10\n\x0e_error_message"\xa0\x02\n\x0eProgressUpdate\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x16\n\x06status\x18\x02 \x01(\tR\x06status\x12!\n\x0cprogress_pct\x18\x03 \x01(\x01R\x0bprogressPct\x12\x18\n\x07message\x18\x04 \x01(\tR\x07message\x12\x38\n\ttimestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12J\n\x0f\x63urrent_metrics\x18\x06 \x01(\x0b\x32\x1c.backtest.PerformanceMetricsH\x00R\x0e\x63urrentMetrics\x88\x01\x01\x42\x12\n\x10_current_metrics"\xab\x01\n\x0fMetricsResponse\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x36\n\x07metrics\x18\x02 \x01(\x0b\x32\x1c.backtest.PerformanceMetricsR\x07metrics\x12?\n\rcalculated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0c\x63\x61lculatedAt"q\n\x15ListBacktestsResponse\x12\x37\n\tbacktests\x18\x01 \x03(\x0b\x32\x19.backtest.BacktestSummaryR\tbacktests\x12\x1f\n\x0btotal_count\x18\x02 \x01(\x05R\ntotalCount"\xc8\x03\n\x0f\x42\x61\x63ktestSummary\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x1f\n\x0bstrategy_id\x18\x02 \x01(\tR\nstrategyId\x12\x35\n\x14strategy_version_seq\x18\x03 \x01(\x05H\x00R\x12strategyVersionSeq\x88\x01\x01\x12\x16\n\x06status\x18\x04 \x01(\tR\x06status\x12\x16\n\x06symbol\x18\x05 \x01(\tR\x06symbol\x12\x1a\n\x08interval\x18\x06 \x01(\tR\x08interval\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x42\n\x0c\x63ompleted_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01R\x0b\x63ompletedAt\x88\x01\x01\x12;\n\x07metrics\x18\t \x01(\x0b\x32\x1c.backtest.PerformanceMetricsH\x02R\x07metrics\x88\x01\x01\x42\x17\n\x15_strategy_version_seqB\x0f\n\r_completed_atB\n\n\x08_metrics"k\n\x16\x43\x61ncelBacktestResponse\x12\x1f\n\x0b\x62\x61\x63ktest_id\x18\x01 \x01(\tR\nbacktestId\x12\x16\n\x06status\x18\x02 \x01(\tR\x06status\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message"\xa6\x02\n\x13HealthCheckResponse\x12\x16\n\x06status\x18\x01 \x01(\tR\x06status\x12!\n\x0cservice_name\x18\x02 \x01(\tR\x0bserviceName\x12\x18\n\x07version\x18\x03 \x01(\tR\x07version\x12\x38\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12\x44\n\x07\x64\x65tails\x18\x05 \x03(\x0b\x32*.backtest.HealthCheckResponse.DetailsEntryR\x07\x64\x65tails\x1a:\n\x0c\x44\x65tailsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01"\x89\x06\n\x12PerformanceMetrics\x12!\n\x0ctotal_return\x18\x01 \x01(\x01R\x0btotalReturn\x12#\n\rannual_return\x18\x02 \x01(\x01R\x0c\x61nnualReturn\x12!\n\x0csharpe_ratio\x18\x03 \x01(\x01R\x0bsharpeRatio\x12#\n\rsortino_ratio\x18\x04 \x01(\x01R\x0csortinoRatio\x12!\n\x0cmax_drawdown\x18\x05 \x01(\x01R\x0bmaxDrawdown\x12\x1e\n\nvolatility\x18\x06 \x01(\x01R\nvolatility\x12!\n\x0ctotal_trades\x18\x07 \x01(\x05R\x0btotalTrades\x12%\n\x0ewinning_trades\x18\x08 \x01(\x05R\rwinningTrades\x12#\n\rlosing_trades\x18\t \x01(\x05R\x0closingTrades\x12\x19\n\x08win_rate\x18\n \x01(\x01R\x07winRate\x12#\n\rprofit_factor\x18\x0b \x01(\x01R\x0cprofitFactor\x12\x1f\n\x0b\x61verage_win\x18\x0c \x01(\x01R\naverageWin\x12!\n\x0c\x61verage_loss\x18\r \x01(\x01R\x0b\x61verageLoss\x12\x1f\n\x0blargest_win\x18\x0e \x01(\x01R\nlargestWin\x12!\n\x0clargest_loss\x18\x0f \x01(\x01R\x0blargestLoss\x12?\n\x1c\x61verage_holding_period_hours\x18\x10 \x01(\x01R\x19\x61verageHoldingPeriodHours\x12\x30\n\x14max_consecutive_wins\x18\x11 \x01(\x01R\x12maxConsecutiveWins\x12\x34\n\x16max_consecutive_losses\x18\x12 \x01(\x01R\x14maxConsecutiveLosses\x12!\n\x0c\x66inal_equity\x18\x13 \x01(\x01R\x0b\x66inalEquity\x12\x1d\n\ntotal_fees\x18\x14 \x01(\x01R\ttotalFees"\xc0\x02\n\x05Trade\x12\x38\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12\x16\n\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x12\n\x04side\x18\x03 \x01(\tR\x04side\x12\x1a\n\x08quantity\x18\x04 \x01(\x01R\x08quantity\x12\x14\n\x05price\x18\x05 \x01(\x01R\x05price\x12\x10\n\x03pnl\x18\x06 \x01(\x01R\x03pnl\x12\x1e\n\ncommission\x18\x07 \x01(\x01R\ncommission\x12\x1e\n\x08trade_id\x18\x08 \x01(\tH\x00R\x07tradeId\x88\x01\x01\x12,\n\x0fportfolio_value\x18\t \x01(\x01H\x01R\x0eportfolioValue\x88\x01\x01\x42\x0b\n\t_trade_idB\x12\n\x10_portfolio_value"\xb8\x01\n\x0b\x45quityPoint\x12\x38\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12\x16\n\x06\x65quity\x18\x02 \x01(\x01R\x06\x65quity\x12\x1a\n\x08\x64rawdown\x18\x03 \x01(\x01R\x08\x64rawdown\x12\x12\n\x04\x63\x61sh\x18\x04 \x01(\x01R\x04\x63\x61sh\x12\'\n\x0fpositions_value\x18\x05 \x01(\x01R\x0epositionsValue2\xdc\x04\n\x0f\x42\x61\x63ktestService\x12V\n\x0f\x45xecuteBacktest\x12 .backtest.ExecuteBacktestRequest\x1a!.backtest.ExecuteBacktestResponse\x12Y\n\x11GetBacktestResult\x12".backtest.GetBacktestResultRequest\x1a .backtest.BacktestResultResponse\x12U\n\x16StreamBacktestProgress\x12\x1f.backtest.StreamProgressRequest\x1a\x18.backtest.ProgressUpdate0\x01\x12L\n\x12GetBacktestMetrics\x12\x1b.backtest.GetMetricsRequest\x1a\x19.backtest.MetricsResponse\x12P\n\rListBacktests\x12\x1e.backtest.ListBacktestsRequest\x1a\x1f.backtest.ListBacktestsResponse\x12S\n\x0e\x43\x61ncelBacktest\x12\x1f.backtest.CancelBacktestRequest\x1a .backtest.CancelBacktestResponse\x12J\n\x0bHealthCheck\x12\x1c.backtest.HealthCheckRequest\x1a\x1d.backtest.HealthCheckResponseb\x06proto3' 

29) 

30 

31_globals = globals() 

32_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) 

33_builder.BuildTopDescriptorsAndMessages( 

34 DESCRIPTOR, "services.backtest.v1.backtest_service_pb2", _globals 

35) 

36if not _descriptor._USE_C_DESCRIPTORS: 

37 DESCRIPTOR._loaded_options = None 

38 _globals["_BACKTESTCONFIG_PARAMSENTRY"]._loaded_options = None 

39 _globals["_BACKTESTCONFIG_PARAMSENTRY"]._serialized_options = b"8\001" 

40 _globals["_HEALTHCHECKRESPONSE_DETAILSENTRY"]._loaded_options = None 

41 _globals["_HEALTHCHECKRESPONSE_DETAILSENTRY"]._serialized_options = b"8\001" 

42 _globals["_EXECUTEBACKTESTREQUEST"]._serialized_start = 91 

43 _globals["_EXECUTEBACKTESTREQUEST"]._serialized_end = 303 

44 _globals["_BACKTESTCONFIG"]._serialized_start = 306 

45 _globals["_BACKTESTCONFIG"]._serialized_end = 1021 

46 _globals["_BACKTESTCONFIG_PARAMSENTRY"]._serialized_start = 832 

47 _globals["_BACKTESTCONFIG_PARAMSENTRY"]._serialized_end = 889 

48 _globals["_GETBACKTESTRESULTREQUEST"]._serialized_start = 1023 

49 _globals["_GETBACKTESTRESULTREQUEST"]._serialized_end = 1107 

50 _globals["_STREAMPROGRESSREQUEST"]._serialized_start = 1109 

51 _globals["_STREAMPROGRESSREQUEST"]._serialized_end = 1190 

52 _globals["_GETMETRICSREQUEST"]._serialized_start = 1192 

53 _globals["_GETMETRICSREQUEST"]._serialized_end = 1269 

54 _globals["_LISTBACKTESTSREQUEST"]._serialized_start = 1272 

55 _globals["_LISTBACKTESTSREQUEST"]._serialized_end = 1484 

56 _globals["_CANCELBACKTESTREQUEST"]._serialized_start = 1486 

57 _globals["_CANCELBACKTESTREQUEST"]._serialized_end = 1567 

58 _globals["_HEALTHCHECKREQUEST"]._serialized_start = 1569 

59 _globals["_HEALTHCHECKREQUEST"]._serialized_end = 1589 

60 _globals["_EXECUTEBACKTESTRESPONSE"]._serialized_start = 1592 

61 _globals["_EXECUTEBACKTESTRESPONSE"]._serialized_end = 1759 

62 _globals["_BACKTESTRESULTRESPONSE"]._serialized_start = 1762 

63 _globals["_BACKTESTRESULTRESPONSE"]._serialized_end = 2382 

64 _globals["_PROGRESSUPDATE"]._serialized_start = 2385 

65 _globals["_PROGRESSUPDATE"]._serialized_end = 2673 

66 _globals["_METRICSRESPONSE"]._serialized_start = 2676 

67 _globals["_METRICSRESPONSE"]._serialized_end = 2847 

68 _globals["_LISTBACKTESTSRESPONSE"]._serialized_start = 2849 

69 _globals["_LISTBACKTESTSRESPONSE"]._serialized_end = 2962 

70 _globals["_BACKTESTSUMMARY"]._serialized_start = 2965 

71 _globals["_BACKTESTSUMMARY"]._serialized_end = 3421 

72 _globals["_CANCELBACKTESTRESPONSE"]._serialized_start = 3423 

73 _globals["_CANCELBACKTESTRESPONSE"]._serialized_end = 3530 

74 _globals["_HEALTHCHECKRESPONSE"]._serialized_start = 3533 

75 _globals["_HEALTHCHECKRESPONSE"]._serialized_end = 3827 

76 _globals["_HEALTHCHECKRESPONSE_DETAILSENTRY"]._serialized_start = 3769 

77 _globals["_HEALTHCHECKRESPONSE_DETAILSENTRY"]._serialized_end = 3827 

78 _globals["_PERFORMANCEMETRICS"]._serialized_start = 3830 

79 _globals["_PERFORMANCEMETRICS"]._serialized_end = 4607 

80 _globals["_TRADE"]._serialized_start = 4610 

81 _globals["_TRADE"]._serialized_end = 4930 

82 _globals["_EQUITYPOINT"]._serialized_start = 4933 

83 _globals["_EQUITYPOINT"]._serialized_end = 5117 

84 _globals["_BACKTESTSERVICE"]._serialized_start = 5120 

85 _globals["_BACKTESTSERVICE"]._serialized_end = 5724 

86# @@protoc_insertion_point(module_scope)