app.backbone.entities.random_test

 1from sqlalchemy import Column, Float, ForeignKey, Integer
 2from sqlalchemy.orm import relationship
 3
 4from . import Base
 5
 6class RandomTest(Base):
 7    __tablename__ = 'RandomTests'
 8
 9    Id = Column(Integer, primary_key=True, autoincrement=True)
10    BotPerformanceId = Column(Integer, ForeignKey('BotPerformances.Id'), nullable=False)
11    RandomTestPerformanceId = Column(Integer, ForeignKey('BotPerformances.Id'), nullable=True)
12    Iterations = Column(Integer, nullable=False)
13    
14    ReturnDdMeanDiff = Column(Float, nullable=True)
15    ReturnDdStdDiff = Column(Float, nullable=True)
16    ReturnDdPValue = Column(Float, nullable=True)
17    ReturnDdZScore = Column(Float, nullable=True)
18
19    ReturnMeanDiff = Column(Float, nullable=True)
20    ReturnStdDiff = Column(Float, nullable=True)
21    ReturnPValue = Column(Float, nullable=True)
22    ReturnZScore = Column(Float, nullable=True)
23
24    DrawdownMeanDiff = Column(Float, nullable=True)
25    DrawdownStdDiff = Column(Float, nullable=True)
26    DrawdownPValue = Column(Float, nullable=True)
27    DrawdownZScore = Column(Float, nullable=True)
28
29    WinrateMeanDiff = Column(Float, nullable=True)
30    WinrateStdDiff = Column(Float, nullable=True)
31    WinratePValue = Column(Float, nullable=True)
32    WinrateZScore = Column(Float, nullable=True)
33
34    # Relación con BotPerformance original
35    BotPerformance = relationship(
36        'BotPerformance',
37        foreign_keys=[BotPerformanceId],
38        back_populates='RandomTest',
39        lazy='joined',
40        uselist=False
41    )
42
43    RandomTestPerformance = relationship(
44        'BotPerformance',
45        foreign_keys=[RandomTestPerformanceId],
46        lazy='joined',
47        uselist=False
48    )
49
50    def __repr__(self):
51        return (f"<RandomTest(id={self.Id}, "
52                f"BotPerformanceId='{self.BotPerformanceId}', "
53                f"RandomTestPerformanceId='{self.RandomTestPerformanceId}', "
54                f"Iterations={self.Iterations})>")
class RandomTest(sqlalchemy.orm.decl_api._DynamicAttributesType, sqlalchemy.inspection.Inspectable[sqlalchemy.orm.mapper.Mapper[typing.Any]]):
 7class RandomTest(Base):
 8    __tablename__ = 'RandomTests'
 9
10    Id = Column(Integer, primary_key=True, autoincrement=True)
11    BotPerformanceId = Column(Integer, ForeignKey('BotPerformances.Id'), nullable=False)
12    RandomTestPerformanceId = Column(Integer, ForeignKey('BotPerformances.Id'), nullable=True)
13    Iterations = Column(Integer, nullable=False)
14    
15    ReturnDdMeanDiff = Column(Float, nullable=True)
16    ReturnDdStdDiff = Column(Float, nullable=True)
17    ReturnDdPValue = Column(Float, nullable=True)
18    ReturnDdZScore = Column(Float, nullable=True)
19
20    ReturnMeanDiff = Column(Float, nullable=True)
21    ReturnStdDiff = Column(Float, nullable=True)
22    ReturnPValue = Column(Float, nullable=True)
23    ReturnZScore = Column(Float, nullable=True)
24
25    DrawdownMeanDiff = Column(Float, nullable=True)
26    DrawdownStdDiff = Column(Float, nullable=True)
27    DrawdownPValue = Column(Float, nullable=True)
28    DrawdownZScore = Column(Float, nullable=True)
29
30    WinrateMeanDiff = Column(Float, nullable=True)
31    WinrateStdDiff = Column(Float, nullable=True)
32    WinratePValue = Column(Float, nullable=True)
33    WinrateZScore = Column(Float, nullable=True)
34
35    # Relación con BotPerformance original
36    BotPerformance = relationship(
37        'BotPerformance',
38        foreign_keys=[BotPerformanceId],
39        back_populates='RandomTest',
40        lazy='joined',
41        uselist=False
42    )
43
44    RandomTestPerformance = relationship(
45        'BotPerformance',
46        foreign_keys=[RandomTestPerformanceId],
47        lazy='joined',
48        uselist=False
49    )
50
51    def __repr__(self):
52        return (f"<RandomTest(id={self.Id}, "
53                f"BotPerformanceId='{self.BotPerformanceId}', "
54                f"RandomTestPerformanceId='{self.RandomTestPerformanceId}', "
55                f"Iterations={self.Iterations})>")

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.

RandomTest(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Id
BotPerformanceId
RandomTestPerformanceId
Iterations
ReturnDdMeanDiff
ReturnDdStdDiff
ReturnDdPValue
ReturnDdZScore
ReturnMeanDiff
ReturnStdDiff
ReturnPValue
ReturnZScore
DrawdownMeanDiff
DrawdownStdDiff
DrawdownPValue
DrawdownZScore
WinrateMeanDiff
WinrateStdDiff
WinratePValue
WinrateZScore
BotPerformance
RandomTestPerformance