chatgpt generated a system but it doesn't work

Discussion in 'Artificial Intelligence' started by 0008, Feb 8, 2023.

  1. Dismiss Notice
  1. 0008

    0008

    I tried using chatgpt to generate a system but it doesn't work properly.


    trading system in Amibroker code that uses MACD and RSI indicators


    // MACD and RSI trading system

    Length = 14;
    FastLength = 12;
    SlowLength = 26;
    SignalLength = 9;

    macd = MACD(Close, FastLength, SlowLength, SignalLength);
    rsi = RSI(Close, Length);

    Buy = Cross(macd.MACD, macd.Signal) AND rsi < 50;
    Sell = Cross(macd.Signal, macd.MACD) OR rsi > 50;

    if (Buy) {
    Buy = ExRem(Buy, Sell);
    }

    if (Sell) {
    Sell = ExRem(Sell, Buy);
    }

    PlotShapes(IIf(Buy, shapeUpArrow, shapeNone), colorGreen, 0, L, Offset=-35);
    PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorRed, 0, H, Offset=-35);
     
  2. Snuskpelle

    Snuskpelle

    You must bugfix manually, ChatGPT tends to get some subtle detail wrong. A PhD colleague of mine drew the comparison that it's like one of her students and she must check everything the student submits.
     
  3. maxinger

    maxinger

  4. Peter8519

    Peter8519

    I ask for a profitable system and chatGPT says... no such thing.

    chatGPT.jpg
     
  5. Snuskpelle

    Snuskpelle

    General questions give general answers. A deceptively more simple general question that it still cannot answer specifically is what you should do to earn one million dollars as fast as possible. Sure, it will tell you could start a business or buy some real estate, but that's a similar kind of non-answer.

    Ask it to implement a mean reversion pair trading strategy based on a DQN taking both instruments price series as inputs... and it will do that. But you really can't tell it to be profitable, that's your job.

    The bot really has the same issues as anyone else attempt to learn trading, in that people don't post their profitable systems/edges online to learn from. And it doesn't do much in the way of synthesis/creativity, beyond the language, so it's unlikely to actually figure something like that out. Scientists and traders are safe for now, it's much worse for writers or translators.
     
    Last edited: Feb 8, 2023
    Peter8519 likes this.
  6. Should be this. Doesn't work that great:

    // MACD and RSI trading system

    Short = False;
    Cover = False;

    Length = 14;
    FastLength = 12;
    SlowLength = 26;
    SignalLength = 9;


    Buy = Cross(MACD(FastLength, SlowLength), Signal(FastLength, SlowLength, SignalLength)) AND RSI(Length) < 50;

    Sell = Cross(Signal(FastLength, SlowLength, SignalLength), MACD(FastLength, SlowLength)) OR RSI(Length) > 50;


    Buy = ExRem(Buy, Sell);

    Sell = ExRem(Sell, Buy);

    PlotShapes(IIf(Buy, shapeUpArrow, shapeNone), colorGreen, 0, L, Offset=-35);
    PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorRed, 0, H, Offset=-35);

    SPY TEST.jpg




     
  7. Peter8519

    Peter8519

    Well said. :thumbsup:
    I was asking for a holy grail. :D
     
  8. M.W.

    M.W.

    Ha, someone else flipping through different RL trading related papers. ;-)

     
  9. GoldDigger

    GoldDigger

    ChatGPT is in beta.
     
  10. What is the "beta" of ChapGPT? I'd say it's pretty high right now, i.e. all over the place!
     
    #10     Feb 8, 2023