YouZum

AI

AI, Committee, Actualités, Uncategorized

The Download: our 35 young innovators and the “censorship-industrial complex”

This is today’s edition of The Download, our weekday newsletter that provides a daily dose of what’s going on in the world of technology. How we picked 35 of the world’s top young scientists and engineers On September 8, MIT Technology Review will reveal its 2026 list of Innovators Under 35, recognizing 35 young people from around the world who are doing groundbreaking scientific work and building clever technical fixes for sticky problems. By finding the top young innovators globally and learning what they’re focused on in their work, we aim to give readers a sense of what advances to expect in the years to come.  As a newsroom, we also use this exercise to help us spot rising talent and get to know some of the best early-career researchers in the fields that we cover. This year, we received 550 nominations. Find out how we whittled them down to 35 of the young innovators shaping the future of technology, and check out last year’s list. —Amy Nordrum How the “censorship-industrial complex” is changing the internet and US policy —Eileen Guo I first heard the term “censorship-industrial complex” on April 15, 2025.  That’s when I got the tip that a small office in the US State Department, which focused on monitoring and countering foreign disinformation from the likes of Russia, Iran, and China, was facing imminent shutdown—the next day.  And the reason? The office was accused of serving as the department’s central hub in the so-called censorship-industrial complex—a sprawling constellation of government agencies, academics, civil society groups, and Big Tech platforms allegedly conspiring to suppress conservative and populist speech online under the guise of combating disinformation.  I broke the story on April 16. But for me, it was just the start of a deep reporting rabbit hole into an idea that had moved from the fringes of the right-wing internet into the Trump administration. For more on what the narrative means for the internet, read my story here. MIT Technology Review Narrated: Montana’s plan to become an experimental medical hub just pushed forward At the end of July, any biotech company in Montana with an experimental drug gained a clear path to selling it to consumers. Companies whose drugs have been through preliminary testing—sometimes in as few as 10 healthy people—can pay $12,500 to apply to a newly established review board. Once approved, they can set their own prices and sell the drugs through experimental treatment clinics, the first of which is likely to open around the end of this year. Montana’s latest right-to-try legislation is unique. While similar laws elsewhere limit access to people with terminal illness, Montana’s system is theoretically open to anyone who gives informed consent and can pay. That includes people desperate for treatments for rare diseases. It also includes those interested in longevity and drugs pitched as preventive therapies. —Jessica Hamzelou This is our latest story to be turned into an MIT Technology Review Narrated podcast, which we publish each week on Spotify and Apple Podcasts. Just navigate to MIT Technology Review Narrated on either platform, and follow us to get all our new content as it’s released. The must-reads I’ve combed the internet to find you today’s most fun/important/scary/fascinating stories about technology. 1 China-linked hackers have hit Taiwan in an “unprecedented” AI attackThey used open-source agents to compromise government websites. (FT $)+ UK military drones were found sending a signal to China. (Cybernews)+ Taiwan’s “silicon shield” could be weakening. (MIT Technology Review) 2 Wall Street firms are paying $100,000 a month to get Trump posts firstTrump Media said more than 10 firms have signed up for the service. (CNN)+ It offers faster access to market-moving posts on Truth Social. (BBC)+ Trump Media also lost $238 million as crypto holdings fell. (CNBC) 3 ICE plans to give officers gloves that can deliver painful electric shocksIt’s set to spend up to $20 million to buy thousands of the devices. (AP News)+ A switch turns them from normal gloves into “electrical mode.” (Guardian) 4 Spotify will label AI artists and stop recommending themThe platform is cracking down on fake performers. (Guardian)+ “AI personas” will appear on artist profiles and track listings. (NYT $) 5 Social media spurred a deadly migrant surge from Morocco to SpainDisinformation encouraged thousands to attempt the crossing. (NYT $) 6 Anthropic’s Claude is adding watermarks to AI text and imagesIt could guarantee votes are counted and kept anonymous. (Axios) 7 Drugs that mimic the brain’s wakefulness signal are taking offOrexin drugs could treat sleep disorders, ADHD and addiction. (Economist $)+ But psychedelics are falling short in clinical trials. (MIT Technology Review) 8 Cargo thieves have turned to violence to steal AI hardwareShipments have disappeared after their escorts were attacked. (Wired $) 9 Scientists may have found the elusive glueball, a particle made of forceA Chinese collider has produced the strongest evidence yet. (Science) 10 A firm selling “100% human-written, never AI” research is entirely AIThe reviewers on the Research Gold site are AI-generated. (404 Media) Quote of the day “I think the fourth wave of slop will be when there’s no longer any meaningful quality hit in slop, when the average piece of slop is better than the best human in that field.”  —Kevin Roose, a technology columnist at The New York Times, tells the Pivot podcast what the next stage of AI slop will look like. One More Thing PATRICK LEGER Are we ready to hand AI agents the keys? We’re starting to give AI agents real autonomy, and we’re not prepared for what could happen next. Any action that can be captured by text is potentially within the purview of AI agents—which is why they can cause so much mischief. “The great paradox of agents is that the very thing that makes them useful—that they’re able to accomplish a range of tasks—involves giving away control,” says Iason Gabriel, a senior staff research scientist at Google DeepMind who focuses on AI ethics. Researchers warn that agents could misinterpret goals, leak sensitive information, fall victim to prompt-injection

The Download: our 35 young innovators and the “censorship-industrial complex” Lire l’article »

AI, Committee, Actualités, Uncategorized

Scaling AI agents with trustworthy data

Business and technology leaders need no convincing that the time of agentic AI is here. Organizations are rapidly adopting agents, and few executives doubt the technology’s potential to transform work. But many organizations find that realizing the desired return on investment (ROI) from AI hinges on having the right foundation, with inadequate infrastructure and data being major blockers. Agentic AI places considerable new demands on enterprise data systems. The shift from answering questions to taking actions means AI agents need data from across the enterprise, in all its structured and unstructured forms, and with the right business context. To make decisions and act in real time, agents also need frictionless access to the organization’s operational systems—for example, those storing its supply chain, point-of-sale, or human resources data. Legacy data systems, even those updated just a few years ago, struggle to meet these demands. DOWNLOAD THE REPORT As AI agents become embedded more widely in enterprise operations, the need to overcome the restrictions of legacy data systems grows more urgent. If Gartner’s prediction that AI agents will augment or automate 50% of business decisions by 2027 proves correct, organizations must eliminate bottlenecks or risk depriving agents of the data they need to make the right decisions at speed. This report, based on a survey of 300 data and technology executives, explores how legacy systems are limiting the effectiveness of AI agents in many organizations. It finds that a handful of organizations—the data leaders—are having greater success with agentic AI and experiencing fewer data limitations as a result of legacy systems. These leaders offer a guide to creating the right data environment for agents to flourish and trusted systems to scale. Key findings from the report include: Few companies currently provide agentic AI with ample access to enterprise data. Across all the surveyed organizations, AI only has access to an average of 45% of company data. That number falls to 30% or less in organizations categorized as “data laggards”. A select group, however, ensures access to over 70% of their data. These “data leaders” are having greater success with their agents than the rest. Trust in agent decisions is a reflection of data readiness. Today, only around half of surveyed organizations trust that the decisions their AI agents make are accurate and relevant. By contrast, 100% of the data leaders trust their agents’ decisions, a strong indicator that reliable AI requires a reliable data foundation. Data leaders find it easier to achieve agent scale and speed. Two-thirds of data laggards say legacy data systems limit AI agent scaling (66%) and prevent agents from making decisions at speed (68%). Having largely overcome legacy data constraints, the leaders have mostly cleared these roadblocks, with just 8% reporting either constraint. The pressure is on to make data estates agent-ready. Within two years, 100% of respondents plan to be using agentic AI, with 69% expecting to use it widely. Without removing data system constraints, agentic AI will fail to deliver the desired speed and efficiencies it promises. Data access and context are top priorities. The most important initiative to enable scaling among all respondents is improving access to structured and unstructured data for AI agents. Also high on the list is enhancing data and AI governance with business context. Data leaders are also focusing heavily on the automation of data management. Download the full report. This content was produced by Insights, the custom content arm of MIT Technology Review. It was not written by MIT Technology Review’s editorial staff. It was researched, designed, and written by human writers, editors, analysts, and illustrators. This includes the writing of surveys and collection of data for surveys. AI tools that may have been used were limited to secondary production processes that passed thorough human review.

Scaling AI agents with trustworthy data Lire l’article »

AI, Committee, Actualités, Uncategorized

Scientists just created female clones of male mice

Scientists have deliberately turned male mouse embryos into females for the first time. A team based in Japan used a CRISPR-based approach to remove the Y chromosome from male cells and create female clones of male mice.  “No one has done this before,” says Monika Ward, a reproductive biologist at the University of Hawaii, who was not involved in the research. The feat could change the way scientists think about reproduction, says Takashi Ishiuchi, a reproductive biologist at the University of Yamanashi, who co-led the work. The findings were published in a preprint paper shared on bioRxiv earlier this month, which has not yet been through the peer-review process. “There’s a fixed concept in our scientific field that we need both females and males for reproduction,” says Ishiuchi. “I think we could change this concept.” He and his colleague Shogo Matoba of the Riken BioResource Research Center in Ibaraki also hope their technique could help rescue endangered species, particularly in cases where only a few individuals remain. “It’s exciting to see,” says Ben Novak, lead scientist at the wildlife conservation organization Revive & Restore, who was not involved in the work. “I am confident there will be plenty of applications, particularly for conservation purposes.” Sex change Ishiuchi says he and his colleagues were inspired by the Okinawa rubble goby, a fish that can change its sex in certain situations. If no males are present, a female can do this in order to reproduce with the other females. Males can also change sex to female. This ability to change sex might be useful when it comes to rescuing endangered species, including mammals. There’s some precedent in the lab—albeit not intentional. In 2009, researchers reported the accidental birth of a single female pup in a batch of 27 clones created from male mouse cells. Sometimes the surviving population of a species falls so low that scientists will try to clone those animals. Cloning isn’t perfect—it can be tricky and inefficient, and it creates genetically identical individuals whose offspring might be more vulnerable to disease. But it has helped scientists with efforts to bring some species back from the brink of extinction, including black-footed ferrets and Przewalski’s horse. Cloning an individual can only replicate its genes, so cloning a male animal will create all male offspring, for example. That won’t help much in the hypothetical situation where only male individuals of a species are left. Ishiuchi has been working on a way to overcome this challenge by altering the chromosomes in cells. Mammals’ DNA is organized in pairs of chromosomes, including one pair of sex chromosomes. These sex chromosomes are typically XX in females and XY in males. It’s the Y chromosome that makes mammals male. Ishiuchi and his colleagues have developed a CRISPR-based tool to get rid of it. Their approach targets a section of the Y chromosome that plays an important role in ensuring that, each time a cell divides, the “daughter” cells inherit the Y chromosome. Cutting the Y When the researchers tested their technique—which they call Y-CUT—in early-stage mouse embryos, they found they were able to eliminate the Y chromosome. Treated XY embryos were transferred to surrogate mice, which gave birth to female pups. The effect can be described as a “sex reversal,” say the researchers. The female pups had XO chromosomes, which means they had one X chromosome rather than the usual two. But this didn’t seem to affect the animals, which grew up healthy and fertile, say Ishiuchi and Matoba. In a second experiment, the researchers found they could also use Y-CUT to create female clones from male mice. A standard approach to cloning involves taking the DNA-containing nucleus of a cell from an adult animal and inserting it into an egg cell that has had its own DNA removed. Under the right conditions, the resulting cell can develop into an animal that is genetically identical to the original donor. Matoba and his colleagues used a similar method. Once they had a glut of these cloned cells, they treated some with Y-CUT before transferring them to surrogate mice to carry the pregnancies. This allowed them to create female clones of male mice. The females are genetically identical to the original male, apart from the missing Y chromosome, says Matoba. “It’s like sci-fi,” says Ishiuchi. Courtesy of Takashi Ichiushi and Shogo Matoba, as published in their bioRxiv preprint. In other experiments, the scientists were able to create female clones from male cells that had been cryopreserved—and the cloned males and females could mate to produce healthy pups. This suggests the Y-CUT approach might allow scientists to create female clones from male samples in “frozen zoos” that store cryopreserved cells and tissues from a range of animal species. It could have uses beyond conservation efforts, too. “This could be used potentially for producing genetically engineered animals,” says Ward. Creating an animal with multiple genetic edits can be time-consuming and expensive; creating male and female clones of that animal could help scientists time and money. Ward also hopes the technique could be a useful tool to study the biology of sex chromosomes. Complementary techniques The Y-CUT approach isn’t perfect. For now, it still requires hollowed-out egg cells, which need to come from females of the same species or at least a closely related one. And it won’t be useful for endangered species in which only females survive. The technique works well in mice, partly because XO female mice are fertile. But while the approach might help some of the 355 endangered and vulnerable species of rodents, other mammals with XO chromosomes tend to experience infertility. But other new technologies could complement Y-CUT. In 2023, Katsuhiko Hayashi of Osaka University and his colleagues showed they could turn cells taken from male mice into egg cells. This enabled them to create mice with two dads—but the same approach could also provide the hollowed-out egg cells needed for the Y-CUT technique. “It’s a complementary story,” says Matoba. Ishiuchi is also working on

Scientists just created female clones of male mice Lire l’article »

AI, Committee, Actualités, Uncategorized

The Download: the next big thing in LLMs and how AI academic research is shifting

This is today’s edition of The Download, our weekday newsletter that provides a daily dose of what’s going on in the world of technology. These startups are chasing the next big thing in LLMs Nine years after Google researchers introduced the transformer, this family of neural networks has become the engine inside every major large language model. But transformers are starting to show their age.  As LLMs get bigger and better, transformers have become a bottleneck. Their dense attention mechanism becomes increasingly expensive as the amount of text grows, and they’re not great at keeping track of a lot of information at once. Here are four new ideas for how to solve the transformer problem—innovations that could change LLMs for good, making them faster, far more efficient, and (maybe) even smarter. —Will Douglas Heaven This story is from MIT Technology Review’s What’s Next series, which looks across industries, trends, and technologies to give you a first look at the future. You can read the rest of them here. AI professors are negotiating the new realities of academic research —Grace Huckins Last week, I headed to a hotel in Mountain View, California, to join some of the most accomplished, and some of the most promising, AI researchers in the world. I was hosting roundtable interviews and speaking at a media training for a convening of the Schmidt Sciences AI2050 program, an initiative funded by Eric and Wendy Schmidt that supports academics whose work involves AI.  The fellows list is a who’s who of AI luminaries, and though not all of them made it out to the Bay, every time I turned a corner I saw a scientist whom I’d interviewed previously or whose research I admired. It’s a weird time for university AI researchers, who make up most of the AI2050 group. Read Grace’s story to find out why, and what could be coming next. This story is from The Algorithm, our weekly AI newsletter. Sign up to receive it in your inbox every Monday. The must-reads I’ve combed the internet to find you today’s most fun/important/scary/fascinating stories about technology. 1 Nvidia has secured $500 billion from Wall Street for AI infrastructureIt’s struck deals with BlackRock, Goldman Sachs, and four others. (BBC)+ Showing the pull of AI compute for ⁠institutional investors. (Reuters $)+ And that AI infrastructure is becoming a new asset class. (CNBC) 2 Mark Zuckerberg’s new manifesto says open-source AI can save the USIt presents a utopian vision of personalized “superintelligence.” (Guardian)+ And arrived the same day as Meta’s new, open-source model. (NYT $)+ Zuckerberg said he plans to launch more of these models. (WSJ $)+ And pit Meta against Chinese open-weight developers. (SCMP) 3 Bernie Sanders has called on Silicon Valley to “pause AI development”He noted that AI giants have pledged to do this if necessary for safety.+ And warned that lawmakers will step in if no action is taken. (Guardian)+ House Democrats are already pressing AI leaders over rogue models. (WP $)+ A populist backlash is building against AI. (MIT Technology Review) 4 A US court will allow thousands of social media lawsuits to proceedThe suits target addictive mechanisms used by Meta, TikTok, Google, and Snapchat. (Axios)+ They claim the platforms are designed to hook young users. (Reuters $)+ Can we repair the internet? (MIT Technology Review) 5 Unitree’s IPO is more than 8,000 times oversubscribed by retailThe Chinese humanoid firm raised $900 million ahead of its listing. (Reuters $)+ Its pricing for the Shanghai IPO values the company at $9 billion. (FT $) 6 Flock’s car-tracking cameras are facing a bipartisan backlashThe surveillance network has spread rapidly across the US. (NYT $)+ Flock also plans to chase shoplifters with drones. (MIT Technology Review) 7 China is breaking up AI relationshipsBeijing has introduced new rules for emotionally interactive AI. (Rest of World)+ It’s surprisingly easy to fall for a chatbot. (MIT Technology Review) 8 An AI tool claims to pick the best 1% of scientific papersBut researchers doubt that AI can reliably judge scientific quality. (Nature) 9 The AI slop backlash is workingIt’s pushing platforms to restrict AI-generated content. (Wired $) 10 An 82-year-old rejected $26 million to turn her farm into a data centerShe criticised the environmental impacts of data centers. (Fortune) Quote of the day “It is not too late to avoid disaster. Stop building machines that humans cannot control.”  —Senator Bernie Sanders urges Sam Altman, Dario Amodei, and Mark Zuckerberg to pause all AI development in a letter. One More Thing The race to make the perfect baby is creating an ethical mess A new field of science is using genetic sequencing to predict what kind of person an embryo might become. Some parents turn to these tests to avoid devastating genetic disorders, while a much smaller group are willing to pay tens of thousands of dollars to optimize for intelligence, appearance, and personality. Customers, however, may not be getting what they’re paying for. Genetics experts have highlighted the potential deficiencies of this testing for years, while its underlying assumptions have made these companies a political lightning rod. As this technology edges toward the mainstream, scientists and ethicists are racing to confront the implications—for our social contract, for future generations, and for our very understanding of what it means to be human. Read the full story. —Julia Black We can still have nice things A place for comfort, fun, and distraction to brighten up your day. (Got any ideas? Drop me a line.) + An eagle-eyed border collie is taking the game of fetch into new waters.+ musicForprogramming has made a valiant attempt to produce the perfect tunes for sustained concentration.+ When kids design playgrounds, they create a cheerful mix of giant chess, pink basketball courts—and lava.+ This power metal version of the “Back to the Future” music is an epic reinvention of the film’s classic theme. 

The Download: the next big thing in LLMs and how AI academic research is shifting Lire l’article »

AI, Committee, Actualités, Uncategorized

How the “censorship-industrial complex” is changing the Internet and US policy

I first heard the term “censorship-industrial complex” on April 15, 2025.  That’s when I got the tip that a small office in the U.S. State Department, which focused on monitoring and countering foreign disinformation from the likes of Russia, Iran, and China, was facing imminent shutdown—the next day.  And the reason? R/FIMI, as the office was called, was accused of serving as the State Department’s central hub in the so-called censorship-industrial complex—a sprawling constellation of government agencies, academics, civil society groups, and Big Tech platforms allegedly conspiring to suppress conservative and populist speech online under the guise of combating disinformation.  I broke the story around 10:30AM on April 16, (and broke more in the weeks that followed) but for me, it was just the start of a deep reporting rabbit-hole into an idea that had moved from the fringes of the right-wing Internet into the mainstream, championed and spread by a network of well-funded conservative media platforms and non-profits, and finally as a sort of prevailing logic behind much of the second Trump administration’s domestic and foreign policy.  But this isn’t just a policy story. The weaponization of ideas about censorship also affects the billions of people globally who get information, or interact with each other, online—which is to say, all of us.  For more on what the narrative means for the Internet, read my story here.

How the “censorship-industrial complex” is changing the Internet and US policy Lire l’article »

AI, Committee, Actualités, Uncategorized

Building and Validating a Quantitative Trading Strategy with OctoBot, Walk-Forward Backtesting, Parameter Optimization, and Interactive Analysis

In this tutorial, we build a complete quantitative backtesting workflow with OctoBot and OctoBot-Script while keeping the environment isolated from Colab’s preinstalled dependencies. We configure a rule-based trading strategy that combines RSI-based oversold signals, EMA trend confirmation, and ATR-driven adaptive stop-loss and take-profit levels, and we execute it through OctoBot’s native market-order and backtesting APIs. We also retrieve historical OHLCV data through OctoBot’s data layer with automatic exchange fallback, perform a multi-parameter grid search over an in-sample period, and select the strongest configuration based on its excess return relative to buy-and-hold. We then validate the selected parameters on a completely separate out-of-sample period to assess generalization and identify potential overfitting. Finally, we extract OctoBot’s backtest report data and use Pandas and Plotly to analyze parameter sensitivity, portfolio performance, price action, indicators, and execution results in an interactive Colab environment. Copy CodeCopiedUse a different Browser SYMBOL = “BTC/USDT” TIME_FRAME = “1d” EXCHANGES = [“binance”, “kucoin”, “okx”, “bybit”, “mexc”, “kraken”] IN_SAMPLE = (“2019-01-01”, “2023-01-01”) OUT_OF_SAMPLE = (“2023-01-01”, “2025-06-01”) GRID = { “rsi_period”: [7, 14, 21], “rsi_threshold”: [25, 30, 35], “tp_atr_mult”: [3.0, 5.0], } FIXED = { “ema_fast”: 50, “ema_slow”: 200, “atr_period”: 14, “sl_atr_mult”: 2.0, “position_size”: “20%”, “min_offset_pct”: 1.0, “max_offset_pct”: 40.0, } VENV_DIR = “/content/octobot_env” WORK_DIR = “/content/octobot_lab” OCTOBOT_V = “2.1.1” PY_VERSION = “3.12” import json, os, subprocess, sys, textwrap, time, itertools, shutil os.makedirs(WORK_DIR, exist_ok=True) PY = os.path.join(VENV_DIR, “bin”, “python”) MARKER = os.path.join(VENV_DIR, “.octobot_ready”) def sh(cmd, **kw): “””Run a command, streaming its output live into the Colab cell.””” print(f”$ {‘ ‘.join(cmd)}”) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1, **kw) for line in p.stdout: print(” ” + line.rstrip()) p.wait() if p.returncode != 0: raise RuntimeError(f”command failed ({p.returncode}): {‘ ‘.join(cmd)}”) if not os.path.exists(MARKER): print(“=” * 90, “n BUILDING OCTOBOT ENVIRONMENT (one-off, ~2 min)n”, “=” * 90) subprocess.run([sys.executable, “-m”, “pip”, “install”, “-q”, “uv”], check=True) UV = [sys.executable, “-m”, “uv”] sh(UV + [“venv”, “–python”, PY_VERSION, VENV_DIR]) sh(UV + [“pip”, “install”, “–python”, PY, “-q”, f”OctoBot=={OCTOBOT_V}”, “wheel”, “setuptools”, “appdirs==1.4.4”]) sh(UV + [“pip”, “install”, “–python”, PY, “-q”, “–no-build-isolation”, “octobot-script”]) sh([PY, “-m”, “octobot_script.cli”, “install_tentacles”, “–quite”]) sh([PY, “-c”, textwrap.dedent(“”” import os, shutil, octobot_script.resources as r base = r.get_report_resource_path(“”) src, dst_dir = os.path.join(base, “index.html”), os.path.join(base, “dist”) os.makedirs(dst_dir, exist_ok=True) dst = os.path.join(dst_dir, “index.html”) if os.path.exists(src) and not os.path.exists(dst): shutil.copy2(src, dst); print(“patched report template ->”, dst) else: print(“report template already fine”) “””)]) open(MARKER, “w”).write(“ok”) print(“n environment readyn”) else: print(” environment already built (delete”, VENV_DIR, “to rebuild)n”) We define the core trading configuration, including the symbol, timeframe, exchange fallback list, backtesting windows, parameter grid, and fixed strategy settings. We then create an isolated Python environment with uv and install the pinned OctoBot and OctoBot-Script dependencies required for the workflow. We also install the OctoBot tentacles package and patch the report-template path so later backtest reporting works correctly inside the Colab environment. Copy CodeCopiedUse a different Browser WORKER = os.path.join(WORK_DIR, “octobot_worker.py”) WORKER_SRC = r”’ import asyncio, itertools, json, os, sys, time, traceback import numpy as np import tulipy import octobot_script as obs CFG = json.load(open(os.environ[“OBS_CONFIG”])) OUT = os.environ[“OBS_OUT”] FIX = CFG[“fixed”] for kw in (“Close”, “High”, “Low”, “Time”, “market”, “current_live_time”, “plot_indicator”): if not hasattr(obs, kw): raise RuntimeError( f”octobot_script.{kw} missing -> tentacles are not installed. ” “Run: python -m octobot_script.cli install_tentacles” ) def tail(*arrays): “””tulipy indicators return different lengths; right-align them all.””” n = min(len(a) for a in arrays) return [np.asarray(a)[-n:] for a in arrays] def clamp(v): return float(min(max(v, FIX[“min_offset_pct”]), FIX[“max_offset_pct”])) def build_callbacks(params, run_data): “”” OctoBot-Script splits a strategy into: initialize(ctx) -> runs once on the first candle. Do vectorised work here. strategy(ctx) -> runs on EVERY closed candle. Keep it cheap. “”” async def initialize(ctx): closes = await obs.Close(ctx, max_history=True) highs = await obs.High(ctx, max_history=True) lows = await obs.Low(ctx, max_history=True) times = await obs.Time(ctx, max_history=True, use_close_time=True) rsi = tulipy.rsi(closes, period=params[“rsi_period”]) ema_f = tulipy.ema(closes, period=FIX[“ema_fast”]) ema_s = tulipy.ema(closes, period=FIX[“ema_slow”]) atr = tulipy.atr(highs, lows, closes, period=FIX[“atr_period”]) t, c, rsi, ema_f, ema_s, atr = tail(times, closes, rsi, ema_f, ema_s, atr) atr_pct = np.where(c > 0, atr / c * 100.0, 0.0) entries, offsets = set(), {} for i in range(len(t)): oversold = rsi[i] < params[“rsi_threshold”] uptrend = ema_f[i] > ema_s[i] if oversold and uptrend and atr_pct[i] > 0: ts = float(t[i]) entries.add(ts) offsets[ts] = ( clamp(FIX[“sl_atr_mult”] * atr_pct[i]), clamp(params[“tp_atr_mult”] * atr_pct[i]), ) run_data[“entries”] = entries run_data[“offsets”] = offsets if run_data.get(“plot”): await obs.plot_indicator(ctx, f”RSI({params[‘rsi_period’]})”, t, rsi, entries) await obs.plot_indicator(ctx, f”EMA{FIX[’ema_fast’]}”, t, ema_f) await obs.plot_indicator(ctx, f”EMA{FIX[’ema_slow’]}”, t, ema_s) await obs.plot_indicator(ctx, “ATR %”, t, atr_pct) async def strategy(ctx): now = obs.current_live_time(ctx) if now not in run_data[“entries”]: return sl, tp = run_data[“offsets”][now] await obs.market( ctx, “buy”, amount=FIX[“position_size”], stop_loss_offset=f”-{sl:.2f}%”, take_profit_offset=f”{tp:.2f}%”, ) return initialize, strategy def metrics(res): br = res.report.get(“bot_report”, {}) first = lambda d: float(list(d.values())[0]) if isinstance(d, dict) and d else float(“nan”) return { “profitability”: first(br.get(“profitability”, {})), “market”: first(br.get(“market_average_profitability”, {})), “reference”: br.get(“reference_market”), “start_portfolio”: str(br.get(“starting_portfolio”)), “end_portfolio”: str(br.get(“end_portfolio”)), “candles”: res.candles_count, “duration_s”: round(res.duration or 0, 2), “errors”: res.report.get(“errors_count”), } async def load_data(window): “””Try each exchange until one serves data (Binance blocks many datacenter IPs).””” start, end = window last = None for ex in CFG[“exchanges”]: try: print(f” ↓ fetching {CFG[‘symbol’]} {CFG[‘time_frame’]} from {ex} ” f”[{time.strftime(‘%Y-%m-%d’, time.gmtime(start))} → ” f”{time.strftime(‘%Y-%m-%d’, time.gmtime(end))}]”, flush=True) data = await obs.get_data( CFG[“symbol”], CFG[“time_frame”], exchange=ex, exchange_type=”spot”, start_timestamp=start, end_timestamp=end, social_services=[], ) print(f” ✓ {ex} ok -> {data.data_files}”, flush=True) return data, ex except Exception as e: last = e print(f” ✗ {ex}: {type(e).__name__}: {e}”, flush=True) raise RuntimeError(f”no exchange served data; last error: {last}”) async def backtest(data, params, plot=False, storage=False): run_data = {“entries”: None, “offsets”: {}, “plot”: plot} init_f, strat_f = build_callbacks(params, run_data) res = await obs.run( data, params, strategy_func=strat_f, initialize_func=init_f, enable_logs=False, enable_storage=storage, ) return res, len(run_data[“entries”] or ()) async def main(): out = {“grid”: [], “best”: None, “oos”: None, “errors”: []} print(“n” + “=” * 78 + “n IN-SAMPLE GRID SEARCHn” + “=” * 78, flush=True) is_data, ex_used = await load_data(CFG[“in_sample”]) out[“exchange”] = ex_used keys = list(CFG[“grid”].keys()) combos = [dict(zip(keys, v)) for v in itertools.product(*CFG[“grid”].values())] print(f” {len(combos)} configurations to evaluaten”, flush=True) for i, params in enumerate(combos, 1): try: res, n_sig = await backtest(is_data, params) m = metrics(res) m.update(params); m[“signals”] = n_sig m[“edge”] = m[“profitability”] – m[“market”] out[“grid”].append(m) print(f” [{i:>2}/{len(combos)}] {params} ” f”P&L {m[‘profitability’]:+.2f}% vs market {m[‘market’]:+.2f}%

Building and Validating a Quantitative Trading Strategy with OctoBot, Walk-Forward Backtesting, Parameter Optimization, and Interactive Analysis Lire l’article »

We use cookies to improve your experience and performance on our website. You can learn more at Politique de confidentialité and manage your privacy settings by clicking Settings.

Privacy Preferences

You can choose your cookie settings by turning on/off each type of cookie as you wish, except for essential cookies.

Allow All
Manage Consent Preferences
  • Always Active

Save
fr_FR